File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ import { fireEvent } from "./events" ;
2+
13function jestFakeTimersAreEnabled ( ) {
24 /* istanbul ignore else */
35 if ( typeof jest !== 'undefined' && jest !== null ) {
@@ -14,7 +16,16 @@ function jestFakeTimersAreEnabled() {
1416
1517const instance = { current : undefined } ;
1618
19+ /**
20+ * Should not rely directly on `afterEach` without library detection
21+ * @see https://testing-library.com/docs/react-testing-library/setup/#skipping-auto-cleanup
22+ */
1723afterEach ( ( ) => {
24+ /**
25+ * Behavior should be customizability like it is with `react-testing-library`
26+ * @see https://testing-library.com/docs/react-testing-library/setup/#skipping-auto-cleanup
27+ */
28+ if ( instance . current ) fireEvent . sigkill ( instance . current ) ;
1829 instance . current = undefined ;
1930} )
2031
Original file line number Diff line number Diff line change @@ -66,6 +66,15 @@ async function render(
6666
6767 exec . stderr . on ( 'data' , ( result : string ) => {
6868 if ( _readyPromiseInternals && ! _isReadyResolved ) {
69+ /**
70+ * TODO: We're getting an error where "result" is only the first line of many drawn.
71+ * Let's go ahead and set a timeout var in `config.js` and debounce the rejection
72+ *
73+ * Then, we'll set a boolean to not do any other kind of logging to stdout (or promise resolve)
74+ * until that timeout/debounce has expired.
75+ *
76+ * Also merge with the `'error'` field above
77+ */
6978 _readyPromiseInternals . reject ( new Error ( result ) )
7079 _isReadyResolved = true ;
7180 }
You can’t perform that action at this time.
0 commit comments