Merge pull request #244 from sveltejs/no-solo-merge

fail CI if any tests have solo: true
pull/248/head
Rich Harris 8 years ago committed by GitHub
commit f5ebc85e53

@ -49,6 +49,10 @@ describe( 'generate', () => {
const config = loadConfig( dir );
if ( config.solo && process.env.CI ) {
throw new Error( 'Forgot to remove `solo: true` from test' );
}
( config.skip ? it.skip : config.solo ? it.only : it )( dir, () => {
let compiled;

@ -1,6 +1,4 @@
export default {
solo: true,
html: `
<div><p class='widget'>Hello</p></div>
`,

@ -8,6 +8,10 @@ describe( 'parse', () => {
const solo = exists( `test/parser/${dir}/solo` );
if ( solo && process.env.CI ) {
throw new Error( 'Forgot to remove `solo: true` from test' );
}
( solo ? it.only : it )( dir, () => {
const input = fs.readFileSync( `test/parser/${dir}/input.html`, 'utf-8' ).replace( /\s+$/, '' );

@ -10,6 +10,10 @@ describe( 'sourcemaps', () => {
const solo = exists( `test/sourcemaps/${dir}/solo` );
if ( solo && process.env.CI ) {
throw new Error( 'Forgot to remove `solo: true` from test' );
}
( solo ? it.only : it )( dir, () => {
const input = fs.readFileSync( `test/sourcemaps/${dir}/input.html`, 'utf-8' ).replace( /\s+$/, '' );
const { code, map } = svelte.compile( input );

@ -26,6 +26,10 @@ describe( 'ssr', () => {
const solo = exists( `test/server-side-rendering/${dir}/solo` );
if ( solo && process.env.CI ) {
throw new Error( 'Forgot to remove `solo: true` from test' );
}
( solo ? it.only : it )( dir, () => {
const component = require( `./server-side-rendering/${dir}/main.html` );

@ -8,6 +8,10 @@ describe( 'validate', () => {
const solo = exists( `test/validator/${dir}/solo` );
if ( solo && process.env.CI ) {
throw new Error( 'Forgot to remove `solo: true` from test' );
}
( solo ? it.only : it )( dir, () => {
const filename = `test/validator/${dir}/input.html`;
const input = fs.readFileSync( filename, 'utf-8' ).replace( /\s+$/, '' );

Loading…
Cancel
Save