lib/assert.js
function(){
		var self = this,
			logs = self._filterLogs(),
			all = logs.all,
			keys = logs.keys,
			time = munit._relativeTime( self.end - self.start );

		// Root module
		if ( ! self.callback ) {
			munit.color.green( "=== All submodules of " + self.nsPath + " have finished ===" );
			return;
		}

		// Content
		munit.color.blue( "\n" + self.nsPath );
		munit.each( self.tests, function( test ) {
			if ( keys[ test.name ] && keys[ test.name ].length ) {
				keys[ test.name ].forEach(function( args ) {
					munit.log.apply( munit, args );
				});
			}

			if ( test.error ) {
				munit.color.red( test.ns );
				munit.log( "\n", test.error.stack );
				munit.log( "\n" );
			}
			else if ( test.skip ) {
				munit.color.gray( "[skipped] " + test.ns );
				munit.color.gray( "\treason: " + test.skip );
			}
			else {
				munit.color.green( test.ns );
			}
		});

		// Logs made after the final test
		if ( all.length ) {
			all.forEach(function( args ) {
				munit.log.apply( munit, args );
			});
		}

		// Final Output
		if ( self.failed ) {
			munit.color.red( "\n-- " + self.failed + " tests failed on " + self.nsPath + " (" + time + ") --\n" );
		}
		else {
			munit.color.green( "\n-- All " + self.passed + " tests passed on " + self.nsPath + " (" + time + ") --\n" );
		}
	}
function(){
		var self = this,
			logs = self._filterLogs(),
			all = logs.all,
			keys = logs.keys,
			time = munit._relativeTime( self.end - self.start );

		// Root module
		if ( ! self.callback ) {
			munit.color.green( "=== All submodules of " + self.nsPath + " have finished ===" );
			return;
		}

		// Content
		munit.color.blue( "\n" + self.nsPath );
		munit.each( self.tests, function( test ) {
			if ( keys[ test.name ] && keys[ test.name ].length ) {
				keys[ test.name ].forEach(function( args ) {
					munit.log.apply( munit, args );
				});
			}

			if ( test.error ) {
				munit.color.red( test.ns );
				munit.log( "\n", test.error.stack );
				munit.log( "\n" );
			}
			else if ( test.skip ) {
				munit.color.gray( "[skipped] " + test.ns );
				munit.color.gray( "\treason: " + test.skip );
			}
			else {
				munit.color.green( test.ns );
			}
		});

		// Logs made after the final test
		if ( all.length ) {
			all.forEach(function( args ) {
				munit.log.apply( munit, args );
			});
		}

		// Final Output
		if ( self.failed ) {
			munit.color.red( "\n-- " + self.failed + " tests failed on " + self.nsPath + " (" + time + ") --\n" );
		}
		else {
			munit.color.green( "\n-- All " + self.passed + " tests passed on " + self.nsPath + " (" + time + ") --\n" );
		}
	}
function ( ) { var self = this , logs = self . _filterLogs ( ) , all = logs . all , keys = logs . keys , time = munit . _relativeTime ( self . end - self . start ) ; // Root module if ( ! self . callback ) { munit . color . green ( "=== All submodules of " + self . nsPath + " have finished ===" ) ; return ; } // Content munit . color . blue ( "\n" + self . nsPath ) ; munit . each ( self . tests , function ( test ) { if ( keys [ test . name ] && keys [ test . name ] . length ) { keys [ test . name ] . forEach ( function ( args ) { munit . log . apply ( munit , args ) ; } ) ; } if ( test . error ) { munit . color . red ( test . ns ) ; munit . log ( "\n" , test . error . stack ) ; munit . log ( "\n" ) ; } else if ( test . skip ) { munit . color . gray ( "[skipped] " + test . ns ) ; munit . color . gray ( "\treason: " + test . skip ) ; } else { munit . color . green ( test . ns ) ; } } ) ; // Logs made after the final test if ( all . length ) { all . forEach ( function ( args ) { munit . log . apply ( munit , args ) ; } ) ; } // Final Output if ( self . failed ) { munit . color . red ( "\n-- " + self . failed + " tests failed on " + self . nsPath + " (" + time + ") --\n" ) ; } else { munit . color . green ( "\n-- All " + self . passed + " tests passed on " + self . nsPath + " (" + time + ") --\n" ) ; } }
Prints module results to cli
Prints module results to cli