fix compiler-errors test suite

pull/9754/head
Rich Harris 3 years ago
parent 402a322317
commit 9873d8141f

@ -12,6 +12,10 @@ interface CompilerErrorTest extends BaseTest {
} }
const { test, run } = suite<CompilerErrorTest>((config, cwd) => { const { test, run } = suite<CompilerErrorTest>((config, cwd) => {
if (!fs.existsSync(`${cwd}/main.svelte`) && !fs.existsSync(`${cwd}/main.svelte.js`)) {
throw new Error('Expected main.svelte or main.svelte.js');
}
if (fs.existsSync(`${cwd}/main.svelte`)) { if (fs.existsSync(`${cwd}/main.svelte`)) {
let caught_error = false; let caught_error = false;

Loading…
Cancel
Save