lib/assert.js
function( startFunc, forced ) {
		var self = this, i, mod;

		// Can only finish an module that's in a closed state
		self.requireState( munit.ASSERT_STATE_CLOSED, startFunc || self.finish );

		// Flip state to finished
		self.state = munit.ASSERT_STATE_FINISHED;

		// Force close each submodule if necessary
		for ( i in self.ns ) {
			mod = self.ns[ i ];

			if ( mod.state < munit.ASSERT_STATE_CLOSED ) {
				mod.close( startFunc || self.finish, true );
			}
		}

		// Only print out results if on the focus path
		if ( munit.render.focusPath( self.nsPath ) ) {
			self._flush();
		}

		// Finish parent if not forced by it
		if ( ! forced ) {
			if ( self.parAssert ) {
				if ( self.parAssert.state < munit.ASSERT_STATE_CLOSED ) {
					munit.render.check();
					return self;
				}

				for ( i in self.parAssert.ns ) {
					mod = self.parAssert.ns[ i ];

					if ( mod.state < munit.ASSERT_STATE_FINISHED ) {
						munit.render.check();
						return self;
					}
				}

				self.parAssert.finish();
			}
			else {
				munit.render.check();
			}
		}

		return self;
	}
function( startFunc, forced ) {
		var self = this, i, mod;

		// Can only finish an module that's in a closed state
		self.requireState( munit.ASSERT_STATE_CLOSED, startFunc || self.finish );

		// Flip state to finished
		self.state = munit.ASSERT_STATE_FINISHED;

		// Force close each submodule if necessary
		for ( i in self.ns ) {
			mod = self.ns[ i ];

			if ( mod.state < munit.ASSERT_STATE_CLOSED ) {
				mod.close( startFunc || self.finish, true );
			}
		}

		// Only print out results if on the focus path
		if ( munit.render.focusPath( self.nsPath ) ) {
			self._flush();
		}

		// Finish parent if not forced by it
		if ( ! forced ) {
			if ( self.parAssert ) {
				if ( self.parAssert.state < munit.ASSERT_STATE_CLOSED ) {
					munit.render.check();
					return self;
				}

				for ( i in self.parAssert.ns ) {
					mod = self.parAssert.ns[ i ];

					if ( mod.state < munit.ASSERT_STATE_FINISHED ) {
						munit.render.check();
						return self;
					}
				}

				self.parAssert.finish();
			}
			else {
				munit.render.check();
			}
		}

		return self;
	}
function ( startFunc , forced ) { var self = this , i , mod ; // Can only finish an module that's in a closed state self . requireState ( munit . ASSERT_STATE_CLOSED , startFunc || self . finish ) ; // Flip state to finished self . state = munit . ASSERT_STATE_FINISHED ; // Force close each submodule if necessary for ( i in self . ns ) { mod = self . ns [ i ] ; if ( mod . state < munit . ASSERT_STATE_CLOSED ) { mod . close ( startFunc || self . finish , true ) ; } } // Only print out results if on the focus path if ( munit . render . focusPath ( self . nsPath ) ) { self . _flush ( ) ; } // Finish parent if not forced by it if ( ! forced ) { if ( self . parAssert ) { if ( self . parAssert . state < munit . ASSERT_STATE_CLOSED ) { munit . render . check ( ) ; return self ; } for ( i in self . parAssert . ns ) { mod = self . parAssert . ns [ i ] ; if ( mod . state < munit . ASSERT_STATE_FINISHED ) { munit . render . check ( ) ; return self ; } } self . parAssert . finish ( ) ; } else { munit . render . check ( ) ; } } return self ; }
Finish this module and all sub modules
Finish this module and all sub modules