Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate Mocha's tests to Unexpected assertion library (#3343)
* convert tests to use Unexpected as assertion library Squashed commits: [fc418f8] remove extra call to done() in test/unit/runnable.spec.js [f1bc24f] lint test/browser-specific/setup.js [48af58c] fix test flake in ESM test [346ab5c] convert bundle and browser-specific tests to unexpected [c76b2f4] fix typo in test/README.md [ci skip] [783f16a] add test/README.md [ci skip] [a5949bb] convert all "only" tests to unexpected [15c921e] lint test/integration/diffs.spec.js [0d7635e] convert all individual reporter tests to unexpectedalso don't eat `STDOUT`--this means the tests have more output--could be useful for debugging. [190f5ed] convert compiler tests to unexpected [822b115] fix test/integration/glob.spec.js [db4853d] fix jsapi test [6f9831d] remove debugs from test/integration/diffs.spec.js [4cfbe4f] remove useless manual browser tests that will never get used properly [4e1d97b] convert test/reporters/base.spec.js to unexpected- add `chai` as dependency for `chai`-specific test, since the old one was based on what we thought it should be, not what it actually is. - improve test output: stop eating `STDOUT` and use color where possible [a8378f9] convert test/node-unit/color.spec.js to unexpected [92f50de] convert test/integration/reporters.spec.js to unexpected [652a331] remove global assert [ec857ef] convert test/integration/diffs.spec.js to unexpectedthis required a bit of massaging, since I had to change the fixture to use `assert`, which produces slightly different output.also move `getDiffs()` out of `test/integration/helpers.js`, since it's only used in `test/integration/diffs.spec.js`. [436e85d] remove userland assert moduleit's safe to use the built-in assert module. [dd7aec7] remove expect.js & karma-expect; add karma-unexpected [01dff70] lint test/setup.js [77203bf] convert test/integration/regression.spec.js to unexpected [e9eb05e] add more assertions; fix others [241159e] convert test/require/require.spec.js to unexpected [eb6bcff] convert test/integration/options.spec.js to unexpected [ada86aa] add custom assertions [5368ebe] convert test/integration/no-diff.spec.js to unexpected [043cfe3] convert test/integration/glob.spec.js to unexpected [df748a3] convert test/integration/compiler-globbing.spec.js to unexpected [5c0a8d0] convert test/interfaces/tdd.spec.js to unexpected [c6622a6] convert test/interfaces/qunit.spec.js to unexpected [1ecd62f] convert test/interfaces/exports.spec.js to unexpected [cabda05] convert test/interfaces/bdd.spec.js to unexpected [454018b] convert test/node-unit/stack-trace-filter.spec.js to unexpected [be6c332] fix unhelpful error thrown from lookupFiles; convert test/node-unit/file-utils.spec.js to unexpected [419d3ed] convert test/unit/grep.spec.js to unexpected [4837a6a] convert test/unit/hook-sync-nested.spec.js to unexpected [6d6b632] convert test/unit/hook-async.spec.js to unexpected [6ec01eb] convert test/unit/hook-sync.spec.js to unexpected [d4f6515] convert test/unit/ms.spec.js to unexpected [c43c096] convert test/unit/mocha.spec.js to unexpected [7aa9b82] convert test/unit/root.spec.js to unexpected [13a9e24] convert test/unit/runnable.spec.js to unexpected [cf9b376] convert test/unit/runner.spec.js to unexpected [efe37f9] simplify exception tests in test/unit/suite.spec.js [c08ba9e] convert test/unit/suite.spec.js to unexpected [41a85d9] convert test/unit/test.spec.js to unexpected [19f2d44] convert test/unit/throw.spec.js to unexpected [70ec725] convert test/unit/context.spec.js to unexpected [8c6cefd] convert test/unit/utils.spec.js to unexpected [a626278] add unexpected * fix missing assertion in an "options" integration test * convert new test in options.spec.js to unexpected * combine Chai test into a single assertion; increase timeout for reporter tests Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
- Loading branch information