ant-design/components/_util/__tests__/ContextIsolator.test.tsx
lijianan 666f38d756
refactor: add ContextIsolator component (#49438)
* refactor: add ContextIsolator component

* fix: fix

* fix: fix

* test: fix test case

* test: add test case

---------

Co-authored-by: afc163 <afc163@gmail.com>
2024-06-21 02:10:21 +08:00

15 lines
402 B
TypeScript

import React from 'react';
import { render } from '../../../tests/utils';
import ContextIsolator from '../ContextIsolator';
describe('ContextIsolator component', () => {
it('ContextIsolator should work when Children is null', () => {
[undefined, null].forEach((item) => {
expect(() => {
render(<ContextIsolator>{item}</ContextIsolator>);
}).not.toThrow();
});
});
});