Skip to content

Commit 5238727

Browse files
committed
add test
1 parent 7ba5f6e commit 5238727

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react';
2+
import { expect } from 'chai';
3+
import { screen, userEvent } from '@mongodb-js/testing-library-compass';
4+
import { LoadingError } from './loading-error';
5+
import { renderWithStore } from '../../../tests/create-store';
6+
import Sinon from 'sinon';
7+
8+
const error = 'Test failure';
9+
10+
function renderWithProps(
11+
props?: Partial<React.ComponentProps<typeof LoadingError>>
12+
) {
13+
return renderWithStore(<LoadingError error={error} {...props} />);
14+
}
15+
16+
describe('LoadingError', function () {
17+
it('renders the error', async function () {
18+
await renderWithProps();
19+
expect(screen.getByText(error)).to.exist;
20+
});
21+
});

0 commit comments

Comments
 (0)