Test Case for zjrJS.Debug.log() - Stable Test Suite for zjrJS

This information lives on a webpage hosted at the following web address: 'https://www.omegajunior.net/code/zjrjs/stable.php'.

Showing whether zjrJS.Debug.log() actually works.

Used zjrJS Version:

Stable Minified version 20141202t2322 of zjrJS.


 

Preconditions


Successful When...
In the form, after pressing the Log button the below text is logged to the browser's console, if available.

Exception
If the browser's console is unavailable, the text is routed through zjrJS.Debug.alert(), for which reason we set zjrJS.Debug.mode to 1.

Text Sent
"Hello, World!"

Text logged
"--zjrJS Debug Log-- Hello, World!"

Text alerted
"--zjrJS Debug Alert--

Hello, World!"
Actions

Test Code:

          var test=({
	run: function () {"use strict";
		if ( !test.require( "zjrJS.Debug.log", 
			"function" ) ) {
			return false;
		}
		var s = "Hello, World!", m = 0, DEBUG_MODE_ON = 1;
		m = new Number(zjrJS.Debug.mode);
		zjrJS.Debug.mode = DEBUG_MODE_ON;
		zjrJS.Debug.log(s);
		zjrJS.Debug.mode = m;
		return false;
	}
});
        

Download:

Download zjrJS’ latest stable build (20141202t2322) minified (7.1KB).

Download zjrJS’ latest stable build (20141202t2322) (11.9KB).

Clicky Analytics