mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 06:52:13 +08:00
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:
@ -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,
|
||||
|
Reference in New Issue
Block a user