mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
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:
parent
ab2eb9db28
commit
2ac7ebe3bf
264 changed files with 1314 additions and 983 deletions
|
@ -90,7 +90,7 @@ describe('dateMath', function () {
|
|||
let now;
|
||||
|
||||
beforeEach(function () {
|
||||
jest.useFakeTimers('modern');
|
||||
jest.useFakeTimers();
|
||||
jest.setSystemTime(unix);
|
||||
now = moment();
|
||||
mmnt = moment(anchor);
|
||||
|
@ -128,7 +128,7 @@ describe('dateMath', function () {
|
|||
let anchored;
|
||||
|
||||
beforeEach(function () {
|
||||
jest.useFakeTimers('modern');
|
||||
jest.useFakeTimers();
|
||||
jest.setSystemTime(unix);
|
||||
now = moment();
|
||||
anchored = moment(anchor);
|
||||
|
@ -166,7 +166,7 @@ describe('dateMath', function () {
|
|||
let anchored;
|
||||
|
||||
beforeEach(function () {
|
||||
jest.useFakeTimers('modern');
|
||||
jest.useFakeTimers();
|
||||
jest.setSystemTime(unix);
|
||||
now = moment();
|
||||
anchored = moment(anchor);
|
||||
|
@ -205,7 +205,7 @@ describe('dateMath', function () {
|
|||
let anchored;
|
||||
|
||||
beforeEach(function () {
|
||||
jest.useFakeTimers('modern');
|
||||
jest.useFakeTimers();
|
||||
jest.setSystemTime(unix);
|
||||
now = moment();
|
||||
anchored = moment(anchor);
|
||||
|
@ -247,7 +247,7 @@ describe('dateMath', function () {
|
|||
let anchored;
|
||||
|
||||
beforeEach(function () {
|
||||
jest.useFakeTimers('modern');
|
||||
jest.useFakeTimers();
|
||||
jest.setSystemTime(unix);
|
||||
now = moment();
|
||||
anchored = moment(anchor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue