-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[DO NOT MERGE] WIP: run tests concurrently; see #2839 #4198
Commits on Apr 20, 2020
-
Configuration menu - View commit details
-
Copy full SHA for ef40c9e - Browse repository at this point
Copy the full SHA ef40c9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a62f3f - Browse repository at this point
Copy the full SHA 0a62f3fView commit details -
revert refactor of setting test.speed in runner
increase timeout in `mocha.spec.js` "unit" test
Configuration menu - View commit details
-
Copy full SHA for db4b9a9 - Browse repository at this point
Copy the full SHA db4b9a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7eac21a - Browse repository at this point
Copy the full SHA 7eac21aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d4a649e - Browse repository at this point
Copy the full SHA d4a649eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61ab96e - Browse repository at this point
Copy the full SHA 61ab96eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fbf7d8a - Browse repository at this point
Copy the full SHA fbf7d8aView commit details -
- 100% coverage for `lib/serializer.js` - add a trivial integration test for `--parallel` - fix typo in integration test helper; output spawned command in a copy/pastable format - remove some unused code - rename `deserializeMessage` => `deserialize` - rename `serializeObject` => `serialize` - docstrings for `lib/serializer.js` - rewrite `SerializableEvent.serialize` as a loop instead of recursive function due to possibility of exceeding max stack trace; other refactors - do not freeze objects returned from various `Runnable`'s `serialize()` method, because `SerializableEvent#serialize` needs to mutate them.
Configuration menu - View commit details
-
Copy full SHA for 485d6ab - Browse repository at this point
Copy the full SHA 485d6abView commit details -
add a lot of unit test coverage around serialization/deserialization
- add more comments/docstrings - some refactors
Configuration menu - View commit details
-
Copy full SHA for e604fa0 - Browse repository at this point
Copy the full SHA e604fa0View commit details -
increase timeout for options tests
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d154141 - Browse repository at this point
Copy the full SHA d154141View commit details -
upgrade unexpected-eventemitter
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 76105e7 - Browse repository at this point
Copy the full SHA 76105e7View commit details -
add some tests for BufferedRunner
- refactor `BufferedRunner#run` to be a void fn - tweak some "bail" handling Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for def4815 - Browse repository at this point
Copy the full SHA def4815View commit details -
add more buffered-runner tests
- remove `promise.allsettled` shim as may not be needed - update `unexpected` to latest, which gives us a new assertion - tweak a unit test for `Runner` to leverage `unexpected-eventemitter` - tweak wallaby settings; increase test timeout
Configuration menu - View commit details
-
Copy full SHA for 20c6604 - Browse repository at this point
Copy the full SHA 20c6604View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5092f08 - Browse repository at this point
Copy the full SHA 5092f08View commit details -
Configuration menu - View commit details
-
Copy full SHA for da7e206 - Browse repository at this point
Copy the full SHA da7e206View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce015ee - Browse repository at this point
Copy the full SHA ce015eeView commit details -
- refactoring for `lib/worker.js` - fixed some docstrings
Configuration menu - View commit details
-
Copy full SHA for e3a38a9 - Browse repository at this point
Copy the full SHA e3a38a9View commit details -
add some assertions for RawRunResult to match JSONRunResult
you can now use "to have passed test count", "to have failed test count" and "to have pending test count" with a `RawRunResult` (the result of calling `helpers.runMocha()`) Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 947a00c - Browse repository at this point
Copy the full SHA 947a00cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b161fc0 - Browse repository at this point
Copy the full SHA b161fc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45233d2 - Browse repository at this point
Copy the full SHA 45233d2View commit details -
fix issue with serialization of cyclic objects
this was discovered when testing `--parallel` with retries. also add some debug statements
Configuration menu - View commit details
-
Copy full SHA for 8aaf72f - Browse repository at this point
Copy the full SHA 8aaf72fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9090d41 - Browse repository at this point
Copy the full SHA 9090d41View commit details -
Configuration menu - View commit details
-
Copy full SHA for 552d92b - Browse repository at this point
Copy the full SHA 552d92bView commit details -
refactor/reorganize some of the integration test helpers
- adds `runMochaAsync` and `runMochaJSONAsync` for convenience
Configuration menu - View commit details
-
Copy full SHA for 269bccc - Browse repository at this point
Copy the full SHA 269bcccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a2a816 - Browse repository at this point
Copy the full SHA 9a2a816View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4c7b7f - Browse repository at this point
Copy the full SHA b4c7b7fView commit details -
fix some flaky tests when run in wallaby
- `config.spec.js` was misusing `rewiremock` - `mocha.spec.js` was loading files it shouldn't
Configuration menu - View commit details
-
Copy full SHA for 2cb5768 - Browse repository at this point
Copy the full SHA 2cb5768View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cfafda - Browse repository at this point
Copy the full SHA 4cfafdaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b05f6f - Browse repository at this point
Copy the full SHA 1b05f6fView commit details -
serialization: add missing functions
`Runnable#isPending()` and `Suite#isPending()` needed by reporters, as was `Test#state`
Configuration menu - View commit details
-
Copy full SHA for c6e560d - Browse repository at this point
Copy the full SHA c6e560dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c3b564 - Browse repository at this point
Copy the full SHA 2c3b564View commit details -
Configuration menu - View commit details
-
Copy full SHA for 10cd2c4 - Browse repository at this point
Copy the full SHA 10cd2c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cfe37c - Browse repository at this point
Copy the full SHA 4cfe37cView commit details -
Configuration menu - View commit details
-
Copy full SHA for d5d6e89 - Browse repository at this point
Copy the full SHA d5d6e89View commit details -
fix serialization of circular data structures
- more useful debug info - renamed a couple debug namespaces; doing `DEBUG=mocha:parallel*` now provides good general-purpose info
Configuration menu - View commit details
-
Copy full SHA for 291b40a - Browse repository at this point
Copy the full SHA 291b40aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 42e466c - Browse repository at this point
Copy the full SHA 42e466cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9c3779 - Browse repository at this point
Copy the full SHA c9c3779View commit details -
remove unnecessary bail handling
- add more realistic tests around bail usage - serializer: rename `failures` to `failureCount` to be more obvious - warn if a single file is executed with `--parallel` - update some comments / debug statements
Configuration menu - View commit details
-
Copy full SHA for fc912e8 - Browse repository at this point
Copy the full SHA fc912e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8e8938 - Browse repository at this point
Copy the full SHA c8e8938View commit details -
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for aaef65f - Browse repository at this point
Copy the full SHA aaef65fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a37e18 - Browse repository at this point
Copy the full SHA 1a37e18View commit details -
- quote strings because YAML is YAML - remove comment cruft
Configuration menu - View commit details
-
Copy full SHA for 1c0971c - Browse repository at this point
Copy the full SHA 1c0971cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d75852 - Browse repository at this point
Copy the full SHA 9d75852View commit details -
Configuration menu - View commit details
-
Copy full SHA for 622d334 - Browse repository at this point
Copy the full SHA 622d334View commit details -
fix return value of BufferedRunner#run
- also rename `opts` to `options`for optional param to `BufferedRunner#run` - tweak warning
Configuration menu - View commit details
-
Copy full SHA for e52fea8 - Browse repository at this point
Copy the full SHA e52fea8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 938ce25 - Browse repository at this point
Copy the full SHA 938ce25View commit details -
fix debug statements to use plain strings
using template strings makes them eagerly-loaded, which is not needed
Configuration menu - View commit details
-
Copy full SHA for 9a8adf6 - Browse repository at this point
Copy the full SHA 9a8adf6View commit details -
- `tap` reporter must report the plan at the END, which is spec-compliant. - `progress` reporter is incompatible because we do not know the total number of tests up-front. - `markdown` reporter _could_ be fixed, but it's too much effort atm. the reason is we don't have a single root suite; we'd need to build the TOC based on every `EVENT_SUITE_BEGIN` begin where the parameter (a deserialized `Suite`) has a `root` prop of `true`. `Suite#serialize` would need to recursively call `serialize()` on each item in its `suites` prop. - added a `SIGINT` handler to the `landing` reporter to restore the cursor and not befoul terminals
Configuration menu - View commit details
-
Copy full SHA for 525cb7c - Browse repository at this point
Copy the full SHA 525cb7cView commit details -
- rename `loadAsync` prop of `Mocha` to `lazyLoadFiles`, which is more descriptive of its intent - refactor a lot of `watch-run.js` to support these changes - remove unneeded `runOptions` parameter of `Mocha#run` - add a docstring or two - refactor `--watch` tests to avoid assigning to the context object
Configuration menu - View commit details
-
Copy full SHA for c9bfa67 - Browse repository at this point
Copy the full SHA c9bfa67View commit details -
integration test helper improvements
- the major change is that `STDERR` will, by default, display in the terminal. this can be used to catch problems that may otherwise have been overlooked, e.g., `test/integration/fixtures/uncaught/listeners.fixture.js` - `DEBUG` is explicitly removed from the env, so we can use it without a bunch of noise, and it will not affect inspection of child process output when `pipe` is used to grab `STDERR` from the child.
Configuration menu - View commit details
-
Copy full SHA for a775327 - Browse repository at this point
Copy the full SHA a775327View commit details -
implement an alternative way to define root hooks; works w/
--parallel
When a module loaded by `--require` exports an object property `mochaHooks`, it can contain four properties corresponding to the four different types of hooks. Each prop can be a function or array of functions. Here's an example using just functions: ``` // hooks.js exports.mochaHooks = { beforeAll() { console.log('beforeAll'); }, beforeEach() { console.log('beforeEach'); }, afterAll() { console.log('afterAll'); }, afterEach() { console.log('afterEach'); } }; ``` Use: ``` mocha --require hooks.js test/**/*.spec.js ``` `--file` does not work as expected before using `--parallel`, because order is non-deterministic. The `hooks.js` file (and anything else `--require`'d) will be loaded _once per child process_.
Configuration menu - View commit details
-
Copy full SHA for 9ffe03f - Browse repository at this point
Copy the full SHA 9ffe03fView commit details -
remove warning about --parallel run with a single test file
this gets annoying too quickly
Configuration menu - View commit details
-
Copy full SHA for 926a934 - Browse repository at this point
Copy the full SHA 926a934View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7210ca0 - Browse repository at this point
Copy the full SHA 7210ca0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c79c359 - Browse repository at this point
Copy the full SHA c79c359View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb6300b - Browse repository at this point
Copy the full SHA fb6300bView commit details -
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 41dcbc9 - Browse repository at this point
Copy the full SHA 41dcbc9View commit details -
json-stream reporter is incompatible with --parallel
this could be fixed (but probably not without breaking changes), but again, `runner.total` is the issue.
Configuration menu - View commit details
-
Copy full SHA for 0415bb7 - Browse repository at this point
Copy the full SHA 0415bb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d1a173 - Browse repository at this point
Copy the full SHA 8d1a173View commit details -
- add `SIGINT` handling for clean worker death - don't sent `SIGTERM` in parallel mode; otherwise it can leave processes hanging around - make `--jobs=0` or `--jobs=1` cause Mocha to run in serial even if `--parallel` is true - reorganize some yargs checks - handle uncaught exceptions from worker processes, recovering where possible - handle `--allow-uncaught` to the best of our ability - ensure `uncaught.spec.js` doesn't flirt with max listeners - make `exit.spec.js` handle `SIGINT` and send `SIGTERM` as fixture should be run in serial, but also with `_mocha` (so there is no global `SIGINT` handler; unsure how the hell this worked before); renamed a misnamed test - skip ESM tests for `--parallel` in unsupported environments - fix `DEBUG` handling in integration tests - fix `bail`-related test for `--parallel` - adds module `promise.allsettled` as a polyfill, which allows us to recover from exceptions in worker processes - upgrades `unexpected-eventemitter` to v2.1.0, which allows for making event assertions in async functions
Configuration menu - View commit details
-
Copy full SHA for 7f35825 - Browse repository at this point
Copy the full SHA 7f35825View commit details -
utils: add a test for async functions in type()
an async function (`async () => {}`) will return `asyncfunction` instead of `function`. who knew!? limited to node tests for now.
Configuration menu - View commit details
-
Copy full SHA for da006c7 - Browse repository at this point
Copy the full SHA da006c7View commit details -
all for async definition of mocha root hooks via --require
a module can now do: `exports.mochaHooks = async () => ({/* mocha hooks obj */})` in addition to `exports.mochaHooks = { /* mocha hooks obj */ }` (the function style can be sync or async) to do this, we use a `middleware()` function in yargs, which (by default) runs _after_ the checks, but before the handler, _and_ can be async, which it is.
Configuration menu - View commit details
-
Copy full SHA for 43ae67f - Browse repository at this point
Copy the full SHA 43ae67fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e289e40 - Browse repository at this point
Copy the full SHA e289e40View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28158ef - Browse repository at this point
Copy the full SHA 28158efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 63d703a - Browse repository at this point
Copy the full SHA 63d703aView commit details -
refactor validatePlugin() to throw nicer errors
created `createInvalidPlugin` method in `lib/errors.js`
Configuration menu - View commit details
-
Copy full SHA for 680240f - Browse repository at this point
Copy the full SHA 680240fView commit details -
- issue `SIGKILL` in `exit.spec.js` to avoid a potential exception when quitting - main mocha executable: use `SIGKILL` instead of unsupported `SIGTERM` on main subprocess in win32.
Configuration menu - View commit details
-
Copy full SHA for 4b96461 - Browse repository at this point
Copy the full SHA 4b96461View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97561ad - Browse repository at this point
Copy the full SHA 97561adView commit details -
Configuration menu - View commit details
-
Copy full SHA for a0423a0 - Browse repository at this point
Copy the full SHA a0423a0View commit details -
improve another regexp in --require test
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 118c137 - Browse repository at this point
Copy the full SHA 118c137View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6afce46 - Browse repository at this point
Copy the full SHA 6afce46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 813016b - Browse repository at this point
Copy the full SHA 813016bView commit details -
fix integration test helper to not completely ignore SIGINT
also allows override of `DEBUG` in environment if we really need it.
Configuration menu - View commit details
-
Copy full SHA for bcc0e4e - Browse repository at this point
Copy the full SHA bcc0e4eView commit details -
- do not force-terminate worker pool when bailing (unnecessary) - use a finite-state-machine-ish thing to manage state - "correctly" resend `SIGINT` in cleanup listener - differentiate between "bailing" and "aborting", which have diff't behaviors: - "bailing" is the `bail` flag - "aborting" is either an uncaught exception (with `--allow-uncaught`) _or_ a `SIGINT` signal
Configuration menu - View commit details
-
Copy full SHA for 88887b6 - Browse repository at this point
Copy the full SHA 88887b6View commit details -
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6545108 - Browse repository at this point
Copy the full SHA 6545108View commit details -
Configuration menu - View commit details
-
Copy full SHA for e10b5e6 - Browse repository at this point
Copy the full SHA e10b5e6View commit details -
add warning if no multiple cores
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fdf9916 - Browse repository at this point
Copy the full SHA fdf9916View commit details -
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d8c7fbc - Browse repository at this point
Copy the full SHA d8c7fbcView commit details -
Configuration menu - View commit details
-
Copy full SHA for e23b4e2 - Browse repository at this point
Copy the full SHA e23b4e2View commit details -
fix test timeouts in slow parallel tests
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 52368a9 - Browse repository at this point
Copy the full SHA 52368a9View commit details -
reduce debug noise from worker
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a509d1c - Browse repository at this point
Copy the full SHA a509d1cView commit details -
exposes `getSummary()` from integration test helpers
Configuration menu - View commit details
-
Copy full SHA for 18f7030 - Browse repository at this point
Copy the full SHA 18f7030View commit details -
fix node arg passing to worker processes
warnings about too many jobs requested; add test
Configuration menu - View commit details
-
Copy full SHA for cba2d7e - Browse repository at this point
Copy the full SHA cba2d7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ad404f - Browse repository at this point
Copy the full SHA 4ad404fView commit details -
fix --require integration test
mainly fiddling with regex's. `[^]` is apparently deprecated (?), so use `[\s\S]` instead.
Configuration menu - View commit details
-
Copy full SHA for 7e2717b - Browse repository at this point
Copy the full SHA 7e2717bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 25d57ec - Browse repository at this point
Copy the full SHA 25d57ecView commit details -
add a serial-mode run (and job names?)
Signed-off-by: Christopher Hiller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e934030 - Browse repository at this point
Copy the full SHA e934030View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4328619 - Browse repository at this point
Copy the full SHA 4328619View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80d5c06 - Browse repository at this point
Copy the full SHA 80d5c06View commit details -
squelch warning about missing language in a fenced code block
markdownlint wants a language or fails, but prism doesn't know what to do with `text` or `plain`, so let's just forget it.
Configuration menu - View commit details
-
Copy full SHA for da44ea1 - Browse repository at this point
Copy the full SHA da44ea1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5a8a76 - Browse repository at this point
Copy the full SHA f5a8a76View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8236d5 - Browse repository at this point
Copy the full SHA c8236d5View commit details
Commits on Apr 21, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0b13c92 - Browse repository at this point
Copy the full SHA 0b13c92View commit details