lib/assert.js
function( name, test, startFunc, extra ) {
		var self = this;

		// Require an active state for tests
		self.requireState( munit.ASSERT_STATE_ACTIVE, startFunc || self.ok );

		// Prevent non empty string names
		if ( ! munit.isString( name ) || ! name.length ) {
			throw new munit.AssertionError(
				"Name not found for test on '" + self.nsPath + "'",
				startFunc || self.ok
			);
		}
		// Prevent duplicate tests
		else if ( self.tests[ name ] ) {
			throw new munit.AssertionError(
				"Duplicate Test '" + name + "' on '" + self.nsPath + "'",
				startFunc || self.ok
			);
		}

		// Increment test count and mark it
		self[ !!( test ) ? '_pass' : '_fail' ]( name, startFunc || self.ok, extra );
		
		// Reached expected number of tests, close off
		if ( self.options.expect > 0 && self.count >= self.options.expect ) {
			self.close();
		}

		return self;
	}
function( name, test, startFunc, extra ) {
		var self = this;

		// Require an active state for tests
		self.requireState( munit.ASSERT_STATE_ACTIVE, startFunc || self.ok );

		// Prevent non empty string names
		if ( ! munit.isString( name ) || ! name.length ) {
			throw new munit.AssertionError(
				"Name not found for test on '" + self.nsPath + "'",
				startFunc || self.ok
			);
		}
		// Prevent duplicate tests
		else if ( self.tests[ name ] ) {
			throw new munit.AssertionError(
				"Duplicate Test '" + name + "' on '" + self.nsPath + "'",
				startFunc || self.ok
			);
		}

		// Increment test count and mark it
		self[ !!( test ) ? '_pass' : '_fail' ]( name, startFunc || self.ok, extra );
		
		// Reached expected number of tests, close off
		if ( self.options.expect > 0 && self.count >= self.options.expect ) {
			self.close();
		}

		return self;
	}
function ( name , test , startFunc , extra ) { var self = this ; // Require an active state for tests self . requireState ( munit . ASSERT_STATE_ACTIVE , startFunc || self . ok ) ; // Prevent non empty string names if ( ! munit . isString ( name ) || ! name . length ) { throw new munit . AssertionError ( "Name not found for test on '" + self . nsPath + "'" , startFunc || self . ok ) ; } // Prevent duplicate tests else if ( self . tests [ name ] ) { throw new munit . AssertionError ( "Duplicate Test '" + name + "' on '" + self . nsPath + "'" , startFunc || self . ok ) ; } // Increment test count and mark it self [ ! ! ( test ) ? '_pass' : '_fail' ] ( name , startFunc || self . ok , extra ) ; // Reached expected number of tests, close off if ( self . options . expect > 0 && self . count >= self . options . expect ) { self . close ( ) ; } return self ; }
Basic boolean test
Basic boolean test