Update dependency @testing-library/dom to v8 (#40990)

* Update dependency @testing-library/dom to v8

* Update our use of useFakeTimers

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
renovate[bot]
2021-10-27 16:57:20 +01:00
committed by GitHub
parent 5449bd9ae7
commit 99b50ffa00
8 changed files with 15 additions and 31 deletions

View File

@ -153,7 +153,7 @@ describe('backendSrv', () => {
describe('when making an unsuccessful call and conditions for retry are favorable and loginPing does not throw', () => {
it('then it should retry', async () => {
jest.useFakeTimers();
jest.useFakeTimers('modern');
const url = '/api/dashboard/';
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
ok: false,
@ -219,7 +219,7 @@ describe('backendSrv', () => {
describe('when making an unsuccessful call and conditions for retry are favorable and retry throws', () => {
it('then it throw error', async () => {
jest.useFakeTimers();
jest.useFakeTimers('modern');
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
ok: false,
status: 401,
@ -274,7 +274,7 @@ describe('backendSrv', () => {
describe('when making an unsuccessful 422 call', () => {
it('then it should emit Validation failed message', async () => {
jest.useFakeTimers();
jest.useFakeTimers('modern');
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
ok: false,
status: 422,
@ -307,7 +307,7 @@ describe('backendSrv', () => {
describe('when making an unsuccessful call and we handle the error', () => {
it('then it should not emit message', async () => {
jest.useFakeTimers();
jest.useFakeTimers('modern');
const { backendSrv, appEventsMock, logoutMock, expectRequestCallChain } = getTestContext({
ok: false,
status: 404,