From fc675664934ff34f313eb760ca4b74368f27aa0c Mon Sep 17 00:00:00 2001 From: Conduitry Date: Thu, 17 May 2018 14:30:07 -0400 Subject: [PATCH] normalize paths in comments in cli tests --- test/cli/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/cli/index.js b/test/cli/index.js index ed29bb84d0..5ddb4eac10 100644 --- a/test/cli/index.js +++ b/test/cli/index.js @@ -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(); }