normalize paths in comments in cli tests

pull/1481/head
Conduitry 7 years ago
parent bd1884a953
commit 860a117f0e

@ -9,7 +9,10 @@ const cli = path.resolve(__dirname, "../../cli/index.ts.js");
function normalize(str) {
return str
.replace(/^\s+$/gm, '')
.replace(/generated by Svelte v[.\d]+/, `generated by Svelte vx.y.z`)
.replace(
/\/\*(.*?)generated by Svelte v[.\d]+/,
(_, path) => `/*${path.replace(/\\/g, '/')}generated by Svelte vx.y.z`
)
.trim();
}

Loading…
Cancel
Save