Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(config): Check for the correct symbolic link before test:client #3392

Merged
merged 1 commit into from
Oct 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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