|
|
|
@ -15,8 +15,10 @@ describe('vars', () => {
|
|
|
|
|
|
|
|
|
|
|
|
desc(dir, () => {
|
|
|
|
desc(dir, () => {
|
|
|
|
test.each(['dom', 'ssr', false])(`generate: %s`, async (generate) => {
|
|
|
|
test.each(['dom', 'ssr', false])(`generate: %s`, async (generate) => {
|
|
|
|
const filename = `${__dirname}/samples/${dir}/input.svelte`;
|
|
|
|
const input = (await import(`./samples/${dir}/input.svelte?raw`)).default
|
|
|
|
const input = fs.readFileSync(filename, 'utf-8').replace(/\s+$/, '');
|
|
|
|
.replace(/\s+$/, '')
|
|
|
|
|
|
|
|
.replace(/\r/g, '');
|
|
|
|
|
|
|
|
|
|
|
|
const expectedError = tryToLoadJson(`${__dirname}/samples/${dir}/error.json`);
|
|
|
|
const expectedError = tryToLoadJson(`${__dirname}/samples/${dir}/error.json`);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|