UNPKG

617 BJavaScriptView Raw
1#!/usr/bin/env node
2'use strict';
3const debug = require('debug')('mocha-chrome');
4const importLocal = require('import-local');
5
6// Prefer the local installation of AVA
7if (importLocal(__filename)) {
8 debug('Using local install of mocha-chrome');
9}
10else {
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}