skip missing input files

pull/3866/head
Tan Li Hau 5 years ago
parent 20451658c1
commit 3d46405481

@ -14,8 +14,11 @@ describe("js", () => {
throw new Error("Forgot to remove `solo: true` from test");
}
(solo ? it.only : it)(dir, () => {
dir = path.resolve(`${__dirname}/samples`, dir);
dir = path.resolve(`${__dirname}/samples`, dir);
const skip = !fs.existsSync(`${dir}/input.svelte`);
(skip ? it.skip : solo ? it.only : it)(dir, () => {
const config = loadConfig(`${dir}/_config.js`);
const input = fs.readFileSync(`${dir}/input.svelte`, "utf-8").replace(/\s+$/, "");

@ -15,7 +15,9 @@ describe('parse', () => {
);
}
(solo ? it.only : it)(dir, () => {
const skip = !fs.existsSync(`${__dirname}/samples/${dir}/input.svelte`);
(skip ? it.skip : solo ? it.only : it)(dir, () => {
const options = tryToLoadJson(`${__dirname}/samples/${dir}/options.json`) || {};
const input = fs.readFileSync(`${__dirname}/samples/${dir}/input.svelte`, 'utf-8').replace(/\s+$/, '');

Loading…
Cancel
Save