it-tools/src/utils/boolean.test.ts

17 lines
431 B
TypeScript
Raw Normal View History

2022-08-18 10:53:23 +02:00
import _ from 'lodash';
import { describe, expect, it } from 'vitest';
import { isNotThrowing } from './boolean';
describe('boolean utils', () => {
describe('isNotThrowing', () => {
it('should return if the call throws or false otherwise', () => {
2022-08-18 10:53:23 +02:00
expect(isNotThrowing(_.noop)).to.eql(true);
expect(
isNotThrowing(() => {
throw new Error();
}),
).to.eql(false);
});
});
});