Repository navigation
test_runner: support watch mode - #45214
Conversation
91df6e5 to
49ad862
Compare
|
@MoLow is this ready for review? At a minimum, it looks like there are linter issues. |
not yet, will work on it today/tomorrow |
49ad862 to
9be722d
Compare
|
@nodejs/test_runner ready for review |
aduh95
left a comment
There was a problem hiding this comment.
We should probably update the doc of --watch-path and --test to clarify they can't be used together
Lines 1214 to 1216 in f1e9382
Lines 1610 to 1611 in f1e9382
We could add an entry to the history of --watch and --test to say that now they can be used together.
Could we add a test to ensure watching ESM works? And maybe even ESM+CJS?
|
@ErickWendel you were asking about this |
aduh95
left a comment
There was a problem hiding this comment.
I don't know if you missed it in my previous review, I was asking if it would be possible to add tests for ESM (i.e. does dependencies loaded though import() from a CJS files are picked up)
|
Going to rebase on top of #45348 to avoid conflicts |
bf37536 to
28f8da3
Compare
|
Landed in 97355c7 |
PR-URL: #45214 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#45214 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #45214 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #45214 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
filterFile() reads #ownerDependencies with the dependency path, but writes the set back keyed by the owner, so each call starts a fresh set and overwrites the previous one. An owner keeps only the last dependency registered for it. unfilterFilesOwnedBy() walks that set to release an owner's dependencies, so every other one stays in #filteredFiles and #dependencyOwners. Under `node --test --watch` a restart re-reports the modules the test still loads, which hides it for those, but a dependency it stopped requiring is never reported again and keeps re-running the test. Read #ownerDependencies with the key it is written with, and collapse the repeated #dependencyOwners lookup in the loop, which now runs once per dependency rather than once per owner. Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com> PR-URL: #66139 Refs: #45214 Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
TODO:
clearFileFiltersfor specific child process