aboutsummaryrefslogtreecommitdiff
path: root/src/utils/boolean.test.ts
blob: 20b8e33aa2d7374a1ac7f49d7bee3c5216840eb9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
    });
  });
});