Created
July 8, 2017 14:53
-
-
Save kentaro-m/592543cdbad15efa71f2ca4c3a6bd5c0 to your computer and use it in GitHub Desktop.
Test runner for Atom package test using mocha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { allowUnsafeEval, allowUnsafeNewFunction } from 'loophole'; | |
const { createRunner } = allowUnsafeEval(() => { | |
return allowUnsafeNewFunction(() => { | |
return require('atom-mocha-test-runner'); | |
}); | |
}); | |
const chai = allowUnsafeEval(() => { | |
return allowUnsafeNewFunction(() => { | |
return require('chai'); | |
}); | |
}); | |
import chaiAsPromised from 'chai-as-promised'; | |
chai.use(chaiAsPromised); | |
global.assert = chai.assert; | |
module.exports = createRunner({ testSuffixes: ['test.js'], reporter: 'spec' }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment