mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 13:57:10 -04:00
15 lines
409 B
TypeScript
15 lines
409 B
TypeScript
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', () => {
|
|
expect(isNotThrowing(() => {})).to.eql(true);
|
|
expect(
|
|
isNotThrowing(() => {
|
|
throw new Error();
|
|
}),
|
|
).to.eql(false);
|
|
});
|
|
});
|
|
});
|