diff --git a/test/runtime-puppeteer/index.ts b/test/runtime-puppeteer/index.ts index 5b330f2f51..b700d47945 100644 --- a/test/runtime-puppeteer/index.ts +++ b/test/runtime-puppeteer/index.ts @@ -109,8 +109,8 @@ describe('runtime (puppeteer)', () => { load(id) { if (id === 'main') { return ` - import SvelteComponent from '${__dirname}/samples/${dir}/main.svelte'; - import config from '${__dirname}/samples/${dir}/_config.js'; + import SvelteComponent from ${JSON.stringify(path.join(__dirname, 'samples', dir, 'main.svelte'))}; + import config from ${JSON.stringify(path.join(__dirname, 'samples', dir, '_config.js'))}; import * as assert from 'assert'; export default async function (target) { @@ -143,16 +143,16 @@ describe('runtime (puppeteer)', () => { target, window, }); - + component.$destroy(); - + if (unhandled_rejection) { throw unhandled_rejection; } } else { component.$destroy(); assert.htmlEqual(target.innerHTML, ''); - + if (unhandled_rejection) { throw unhandled_rejection; }