lib/assert.js
function( name, match, block ) {
		var self = this, result = { passed: false, extra: 'Block did not throw error' };

		// Variable arguments
		if ( block === undefined && munit.isFunction( match ) ) {
			block = match;
			match = undefined;
		}

		// Fail quick if block isn't a function
		if ( ! munit.isFunction( block ) ) {
			throw new Error( "Block passed to assert.throws is not a function: '" + block + "'" );
		}

		// test for throwing
		try {
			block();
		}
		catch ( e ) {
			result = self._errorMatch( e, match );
		}

		return self.ok( name, result.passed, self.throws, result.extra );
	}
function( name, match, block ) {
		var self = this, result = { passed: false, extra: 'Block did not throw error' };

		// Variable arguments
		if ( block === undefined && munit.isFunction( match ) ) {
			block = match;
			match = undefined;
		}

		// Fail quick if block isn't a function
		if ( ! munit.isFunction( block ) ) {
			throw new Error( "Block passed to assert.throws is not a function: '" + block + "'" );
		}

		// test for throwing
		try {
			block();
		}
		catch ( e ) {
			result = self._errorMatch( e, match );
		}

		return self.ok( name, result.passed, self.throws, result.extra );
	}
function ( name , match , block ) { var self = this , result = { passed : false , extra : 'Block did not throw error' } ; // Variable arguments if ( block === undefined && munit . isFunction ( match ) ) { block = match ; match = undefined ; } // Fail quick if block isn't a function if ( ! munit . isFunction ( block ) ) { throw new Error ( "Block passed to assert.throws is not a function: '" + block + "'" ) ; } // test for throwing try { block ( ) ; } catch ( e ) { result = self . _errorMatch ( e , match ) ; } return self . ok ( name , result . passed , self . throws , result . extra ) ; }
Run internal throw handle
Run internal throw handle