From fc646925db29b89cb4d17a53d06130f8123f1df6 Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sun, 2 Apr 2017 13:45:01 -0400 Subject: [PATCH] make it easier to run parser tests solo --- test/parser/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parser/index.js b/test/parser/index.js index ed3f62368a..fb18cf1623 100644 --- a/test/parser/index.js +++ b/test/parser/index.js @@ -1,15 +1,16 @@ import assert from 'assert'; import * as fs from 'fs'; -import { svelte, exists } from '../helpers.js'; +import { svelte } from '../helpers.js'; describe( 'parse', () => { fs.readdirSync( 'test/parser/samples' ).forEach( dir => { if ( dir[0] === '.' ) return; - const solo = exists( `test/parser/samples/${dir}/solo` ); + // add .solo to a sample directory name to only run that test + const solo = /\.solo$/.test( dir ); if ( solo && process.env.CI ) { - throw new Error( 'Forgot to remove `solo: true` from test' ); + throw new Error( `Forgot to remove '.solo' from test parser/samples/${dir}` ); } ( solo ? it.only : it )( dir, () => {