add some eslint rules for testing-library use in tests

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-11-16 09:32:58 +01:00
parent fd7ec12ec2
commit cb716004ef
31 changed files with 236 additions and 134 deletions
@@ -122,7 +122,7 @@ describe('<AuditListTableForEntity />', () => {
it('renders nothing', async () => {
const { queryByTestId } = subject();
expect(await queryByTestId('AuditListTable')).toBeNull();
expect(queryByTestId('AuditListTable')).toBeNull();
});
});
@@ -137,7 +137,7 @@ describe('<AuditListTableForEntity />', () => {
it('renders nothing', async () => {
const { queryByTestId } = subject();
expect(await queryByTestId('AuditListTable')).toBeNull();
expect(queryByTestId('AuditListTable')).toBeNull();
});
});
});
@@ -151,10 +151,10 @@ describe('<LastLighthouseAuditCard />', () => {
it('renders nothing', async () => {
const { queryByTestId } = subject();
expect(await queryByTestId('AuditListTable')).toBeNull();
expect(queryByTestId('AuditListTable')).toBeNull();
});
});
//
describe('where there is no data', () => {
beforeEach(() => {
(useWebsiteForEntity as jest.Mock).mockReturnValue({
@@ -166,7 +166,7 @@ describe('<LastLighthouseAuditCard />', () => {
it('renders nothing', async () => {
const { queryByTestId } = subject();
expect(await queryByTestId('AuditListTable')).toBeNull();
expect(queryByTestId('AuditListTable')).toBeNull();
});
});
});