Skip to content

Commit 79c5d11

Browse files
committed
Add unit tests for AccordionContext
1 parent 863a4d0 commit 79c5d11

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as React from 'react';
2+
import { render } from 'react-testing-library';
3+
import { Consumer, Provider } from './AccordionContext';
4+
5+
describe('ItemContext', () => {
6+
it('renders children props', () => {
7+
const { getByText } = render(
8+
<Provider>
9+
<Consumer>{(): string => 'Hello World'}</Consumer>
10+
</Provider>,
11+
);
12+
13+
expect(getByText('Hello World')).toBeTruthy();
14+
});
15+
});

0 commit comments

Comments
 (0)