15 lines
461 B
JavaScript
Executable File
15 lines
461 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
'use strict'
|
|
const path = require('path')
|
|
|
|
/**
|
|
* Find mocha and run it (we don't want to hardcode a specific node_modules path).
|
|
* We use this so that we can pass in specific flags to node before mocha even begins to run
|
|
*/
|
|
const relativeBinPath = './bin/mocha.js'
|
|
|
|
const mochaPath = require.resolve('mocha')
|
|
const mochaPathDir = path.dirname(mochaPath)
|
|
const mochaBinPath = path.join(mochaPathDir, relativeBinPath)
|
|
require(mochaBinPath)
|