Update jest monorepo to v29 (#58261)

* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
renovate[bot]
2022-11-24 14:00:41 +00:00
committed by GitHub
parent 8e6d343981
commit e84a01e870
91 changed files with 11654 additions and 11597 deletions

View File

@@ -1,4 +1,4 @@
import { render, screen } from '@testing-library/react';
import { act, render, screen } from '@testing-library/react';
import React from 'react';
import { DataSourcePluginMeta } from '@grafana/data';
@@ -39,7 +39,9 @@ describe('LokiQueryBuilderContainer', () => {
render(<LokiQueryBuilderContainer {...props} />);
const selector = await screen.findByLabelText('selector');
expect(selector.textContent).toBe('{job="testjob"}');
await addOperation('Range functions', 'Rate');
await act(async () => {
await addOperation('Range functions', 'Rate');
});
expect(await screen.findByText('Rate')).toBeInTheDocument();
expect(props.onChange).toBeCalledWith({
expr: 'rate({job="testjob"} [$__interval])',