mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
8 lines
292 B
TypeScript
8 lines
292 B
TypeScript
// @ts-nocheck
|
|
import { invariant } from '../../src/utils/invariant';
|
|
|
|
it('invariant', () => {
|
|
expect(() => invariant(true)).not.toThrow();
|
|
expect(() => invariant(false, 'abc', 'xxx')).toThrow(/Invariant failed:/);
|
|
expect(() => invariant(false, 'abc')).toThrow(/Invariant failed:/);
|
|
}); |