From 95501ed5f5948ace5546356710de8460d2c0f122 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 14 Nov 2019 16:34:30 -0500 Subject: [PATCH] Print 'delete this directory' message and move on --- test/js/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/js/index.js b/test/js/index.js index 6df2c9baf1..8954a50365 100644 --- a/test/js/index.js +++ b/test/js/index.js @@ -1,6 +1,7 @@ import * as assert from "assert"; import * as fs from "fs"; import * as path from "path"; +import * as kleur from "kleur"; import { loadConfig, svelte, shouldUpdateExpected } from "../helpers.js"; describe("js", () => { @@ -16,7 +17,10 @@ describe("js", () => { dir = path.resolve(`${__dirname}/samples`, dir); - const skip = !fs.existsSync(`${dir}/input.svelte`); + if (!fs.existsSync(`${dir}/input.svelte`)) { + console.log(colors.red().bold(`Missing file ${dir}/input.svelte. If you recently switched branches you may need to delete this directory`)); + return; + } (skip ? it.skip : solo ? it.only : it)(dir, () => { const config = loadConfig(`${dir}/_config.js`);