()
| 31 | } |
| 32 | |
| 33 | function runTests() { |
| 34 | if (common.protocol() == 'mongodb' && common.nodeVersion().major > 6) { |
| 35 | console.warn(chalk.red("MongoDB 1.x doesn't work with node 7, 8 or newer.")); |
| 36 | console.warn(chalk.red("Tests will not run.")); |
| 37 | console.warn(chalk.red("If you would like this to work, please submit a pull request.")); |
| 38 | return; |
| 39 | } |
| 40 | |
| 41 | glob.sync(location).forEach(function (file) { |
| 42 | if (!shouldRunTest(file)) return; |
| 43 | mocha.addFile(file); |
| 44 | }); |
| 45 | |
| 46 | logging.info("Testing **%s**", common.getConnectionString()); |
| 47 | |
| 48 | mocha.run(function (failures) { |
| 49 | process.exit(failures); |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | runTests(); |
no test coverage detected