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:
Hugo Häggmark
2020-03-12 10:22:33 +01:00
committed by GitHub
parent 4fecf5a7a6
commit b51e28bc15
35 changed files with 202 additions and 160 deletions

View File

@@ -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');

View File

@@ -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');

View File

@@ -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([]);
});
});