Last active
October 28, 2018 06:25
-
-
Save whitehorse0/cb1520284a41160328b0c27a3744d9dc to your computer and use it in GitHub Desktop.
File to registry API testing Node.js
This file contains hidden or 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
const Mocha = require('mocha') | |
const mocha = new Mocha() // Instantiate a Mocha instance. | |
var testsDir = [ | |
'./tests/api/users/' | |
] | |
for (var i = 0; i < testsDir.length; i++) { | |
mocha.addFile(testsDir[i]) | |
} | |
// Run the tests. | |
mocha.run(function (failures) { | |
// exit with non-zero status if there were failures | |
process.exitCode = failures ? -1 : 0 | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment