Skip to content

Commit

Permalink
test(config): Check for the correct symbolic link before test:client (k…
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjbarton authored Oct 28, 2019
1 parent d18b943 commit bfa7741
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/client/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const fs = require('fs')

var TRAVIS_WITHOUT_BS = process.env.TRAVIS_SECURE_ENV_VARS === 'false'

var launchers = {
Expand Down Expand Up @@ -43,6 +45,27 @@ var launchers = {
}
}

// Verify the install. This will run async but that's ok we'll see the log.
fs.lstat('node_modules/karma', (err, stats) => {
if (err) {
console.error('Cannot verify installation', err.stack || err)
}
if (stats && stats.isSymbolicLink()) {
return
}

console.log('**** Incorrect directory layout for karma self-tests ****')
console.log(`
$ npm install
$ rm -rf node_modules/karma
$ cd node_modules
$ ln -s ../ karma
$ cd ../
$ grunt browserify
`)
process.exit(1)
})

var browsers = []

if (process.env.TRAVIS) {
Expand Down

0 comments on commit bfa7741

Please sign in to comment.