Commit Graph

2 Commits

Author SHA1 Message Date
Luigi Pinca
626367c4e3 test: deflake test-common-expect-warning
The subprocess might exit before the data is flushed. Run the assertion
after the `'end'` event is emitted.

PR-URL: https://github.com/nodejs/node/pull/42046
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-02-24 21:08:15 +01:00
Rich Trott
0465373d77
test: improve expectWarning error message
expectWarning() fails with a TypeError and a message about undefined not
being iterable when the warning is emitted more times than expected.
This change produces a more useful error message.

Refs: https://github.com/nodejs/node/pull/41307/files#r775197738

PR-URL: https://github.com/nodejs/node/pull/41326
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-12-30 05:58:53 +00:00