-
Notifications
You must be signed in to change notification settings - Fork 3
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
self-executable tests #3
Comments
@azu You can do execute the kocha test cases by yourself by running the following code after all test suites/cases are registered. const getRunner = require('kocha').getRunner
let failed = false
const runner = getRunner()
const Reporter = require('kocha/src/reporters/spec')
new Reporter(runner)
runner.on('fail', () => { failed = true })
runner.on('end', () => process.exit(failed))
runner.run() I added examples for these use cases in The run script I haven't heard of js-reporters. It seems like a decent approach to separating test runners from the reporters! 👍 |
Thanks! |
For the moment, getRunner is not a part of public api and could be broken at some time. If you build something on top of kocha, please let me know ;) I hope we can collaborate. |
Is there any chance I could run the test as node scripts like tape?
Currenly,
node examples/simple-fail.js
not throw error.For example, It may help to
The text was updated successfully, but these errors were encountered: