ugh try this

pull/1839/head
Rich Harris 7 years ago
parent 80275511ef
commit 5a8da5d724

@ -25,8 +25,8 @@ function getName(filename) {
return base[0].toUpperCase() + base.slice(1); return base[0].toUpperCase() + base.slice(1);
} }
const sveltePath = process.cwd(); const sveltePath = process.cwd().split('\\').join('/');
const internal = path.join(sveltePath, 'internal.js'); const internal = `${sveltePath}/internal.js`;
describe("runtime", () => { describe("runtime", () => {
before(() => { before(() => {
@ -39,9 +39,7 @@ describe("runtime", () => {
compileOptions compileOptions
); );
const { js } = compile(fs.readFileSync(filename, "utf-8"), options); const { js: { code } } = compile(fs.readFileSync(filename, "utf-8"), options);
const code = js.code.replace(/require\("svelte"\)/g, `require(${JSON.stringify(main)})`);
return module._compile(code, filename); return module._compile(code, filename);
}; };

Loading…
Cancel
Save