Skip to content

Commit

Permalink
do not run browser test in node v6
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jan 30, 2019
1 parent a51cc6f commit 7daf018
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions browser-test.js
@@ -1,12 +1,15 @@
#!/usr/bin/env node

if (process.platform !== 'win32') {
if (process.platform === 'win32') {
console.log('browser test not supported on windows')
} else if (process.version.match(/^v[0-6]\./)) {
console.log('browser test not suppored prior to node v8')
} else if (process.platform !== 'win32') {
console.error('> karma start karma.conf.js')
require('child_process').spawn('karma', ['start', 'karma.conf.js'], {
stdio: 'inherit'
}).on('close', (code, signal) => {
if (code || signal)
process.exit(code || 1)
})
} else
console.log('browser test not supported on windows')
}

0 comments on commit 7daf018

Please sign in to comment.