mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: reduces strict null errors to 824 (#22744)
* Chore: reduces strict null errors with 100+ * Chore: lowers the build error number
This commit is contained in:
@@ -43,6 +43,7 @@ const renderAndSubmitForm = async (dashboard: any, submitSpy: any) => {
|
||||
/>
|
||||
);
|
||||
|
||||
// @ts-ignore strict null error below
|
||||
await act(async () => {
|
||||
const button = container.find('button[aria-label="Save dashboard button"]');
|
||||
button.simulate('submit');
|
||||
|
||||
@@ -39,6 +39,7 @@ const renderAndSubmitForm = async (dashboard: any, submitSpy: any) => {
|
||||
/>
|
||||
);
|
||||
|
||||
// @ts-ignore strict null error below
|
||||
await act(async () => {
|
||||
const button = container.find('button[aria-label="Dashboard settings Save Dashboard Modal Save button"]');
|
||||
button.simulate('submit');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { versions, restore } from './__mocks__/history';
|
||||
import { restore, versions } from './__mocks__/history';
|
||||
import { HistorySrv } from './HistorySrv';
|
||||
import { DashboardModel } from '../../state/DashboardModel';
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('historySrv', () => {
|
||||
});
|
||||
|
||||
it('should return an empty array when not given a dashboard', () => {
|
||||
return historySrv.getHistoryList(null, historyListOpts).then((versions: any) => {
|
||||
return historySrv.getHistoryList((null as unknown) as DashboardModel, historyListOpts).then((versions: any) => {
|
||||
expect(versions).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user