Codemod tests to waitFor pattern (2/?) (#26296)

This converts some of our test suite to use the `waitFor` test pattern,
instead of the `expect(Scheduler).toFlushAndYield` pattern. Most of
these changes are automated with jscodeshift, with some slight manual
cleanup in certain cases.

See #26285 for full context.
This commit is contained in:
Andrew Clark
2023-03-03 17:01:57 -05:00
committed by GitHub
parent 1f1f8eb559
commit ce8a72fd4e
14 changed files with 449 additions and 388 deletions

View File

@@ -17,6 +17,12 @@ const packages = readdirSync(packagesRoot).filter(dir => {
if (dir.includes('react-devtools')) {
return false;
}
if (dir === 'internal-test-utils') {
// This is an internal package used only for testing. It's OK to read
// from source.
// TODO: Maybe let's have some convention for this?
return false;
}
const packagePath = join(packagesRoot, dir, 'package.json');
let stat;
try {