mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-20 12:28:10 +08:00
316b925f94
* Use unreachable exception in favor of type safety * Add tests * add test
9 lines
313 B
JavaScript
9 lines
313 B
JavaScript
import UnreachableException from '../unreachableException';
|
|
|
|
describe('UnreachableException', () => {
|
|
it('error thrown matches snapshot', () => {
|
|
const exception = new UnreachableException('some value');
|
|
expect(exception.message).toMatchInlineSnapshot(`"unreachable case: \\"some value\\""`);
|
|
});
|
|
});
|