mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
a8db941fb7de28f72e0725dee89b6a298683b3a7
Run snap tester on a forked node process so runs can be interrupted. (Currently, `Ctrl+C` is not handled until after all test fixtures finish compiling). This *feels* a bit heavy-handed, but main.ts is pretty small and doesn't do much other than listen for input / signals. Would love feedback here since I haven't really worked with nodejs / JS cli tools before - main.ts new file that spawns forked runner - pipe stdin/out/err to and from the child runner process, details described in comments. - listens for exit event of child - runner.ts - added logic to listen for interrupts and clean up (not really familiar with how file and tsc watchers are implemented, so we try to call 'close' on them just in case they need to release locks / do other cleanup)
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%