mirror of
				https://github.com/CorentinTh/it-tools.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			431 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			431 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
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', () => {
 | 
						|
      expect(isNotThrowing(_.noop)).to.eql(true);
 | 
						|
      expect(
 | 
						|
        isNotThrowing(() => {
 | 
						|
          throw new Error();
 | 
						|
        }),
 | 
						|
      ).to.eql(false);
 | 
						|
    });
 | 
						|
  });
 | 
						|
});
 |