From 5a8da5d724cb9b538d562d0b71ce2a7c06568687 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 11 Dec 2018 20:20:16 -0500 Subject: [PATCH] ugh try this --- test/runtime/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/runtime/index.js b/test/runtime/index.js index f1f7095949..58ef9d8734 100644 --- a/test/runtime/index.js +++ b/test/runtime/index.js @@ -25,8 +25,8 @@ function getName(filename) { return base[0].toUpperCase() + base.slice(1); } -const sveltePath = process.cwd(); -const internal = path.join(sveltePath, 'internal.js'); +const sveltePath = process.cwd().split('\\').join('/'); +const internal = `${sveltePath}/internal.js`; describe("runtime", () => { before(() => { @@ -39,9 +39,7 @@ describe("runtime", () => { compileOptions ); - const { js } = compile(fs.readFileSync(filename, "utf-8"), options); - - const code = js.code.replace(/require\("svelte"\)/g, `require(${JSON.stringify(main)})`); + const { js: { code } } = compile(fs.readFileSync(filename, "utf-8"), options); return module._compile(code, filename); };