Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoferraro committed May 17, 2022
1 parent 017d138 commit 2d44546
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
18 changes: 18 additions & 0 deletions web/src/components/Layout/__tests__/Layout.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {act, render} from '@testing-library/react';
import {MemoryRouter} from 'react-router-dom';
import Layout from '../index';

test('Layout', () => {
act(() => {
const result = render(
<MemoryRouter>
<Layout>
<h2>This</h2>
</Layout>
</MemoryRouter>
);
});
// const input = screen.getByText('This');
// expect(result.container).toMatchSnapshot();
// expect(input).toBeTruthy();
});
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {act, render} from '@testing-library/react';
import {MemoryRouter} from 'react-router-dom';
import {store} from '../../../redux/store';
import TraceAssertionsTable from '../TraceAssertionsTable';

test('Layout', () => {
act(() => {
const result = render(
<MemoryRouter>
<Provider store={store}>
<TraceAssertionsTable
assertionResult={{
assertion: {assertionId: '', selectors: undefined, spanAssertions: undefined},
spanListAssertionResult: [],
}}
onSpanSelected={jest.fn()}
>
<h2>This</h2>
</TraceAssertionsTable>
</Provider>
</MemoryRouter>
);
});
// const input = screen.getByText('This');
expect(result.container).toMatchSnapshot();
// expect(input).toBeTruthy();
});

0 comments on commit 2d44546

Please sign in to comment.