Upgrade to Jest 29 (#143319)

https://jestjs.io/blog/2022/04/25/jest-28
https://jestjs.io/blog/2022/08/25/jest-29

- jest.useFakeTimers('legacy') -> jest.useFakeTimers({ legacyFakeTimers:
true });
- jest.useFakeTimers('modern'); -> jest.useFakeTimers();
- tests can either use promises or callbacks, but not both
- test runner jasmine is no longer included, switch all suites to
jest-circus

Co-authored-by: Andrew Tate <andrew.tate@elastic.co>
This commit is contained in:
Jonathan Budzenski 2022-11-18 09:40:16 -06:00 committed by GitHub
parent ab2eb9db28
commit 2ac7ebe3bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
264 changed files with 1314 additions and 983 deletions

View file

@ -15,7 +15,7 @@ import { extendedEnvSerializer } from './test_helpers';
import { DevServer, Options } from './dev_server';
import { TestLog } from './log';
jest.useFakeTimers('modern');
jest.useFakeTimers();
class MockProc extends EventEmitter {
public readonly signalsSent: string[] = [];