1 |
|
2 | ;
|
3 | const debug = require('debug')('mocha-chrome');
|
4 | const importLocal = require('import-local');
|
5 |
|
6 | // Prefer the local installation of AVA
|
7 | if (importLocal(__filename)) {
|
8 | debug('Using local install of mocha-chrome');
|
9 | }
|
10 | else {
|
11 | // feel pity for folks whose sad IT departments keep them in the dark ages
|
12 | // here's to you, Node 4 and 6 hermits 🍻
|
13 | if (process.argv.indexOf('--old-and-busted') >= 0) {
|
14 | require('babel-register')({
|
15 | ignore: /node_modules\/(?!mocha-chrome|chrome-launcher|lighthouse-logger)/
|
16 | });
|
17 | require('babel-polyfill');
|
18 | }
|
19 |
|
20 | require('./lib/cli');
|
21 | }
|