You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
338 B
JavaScript
13 lines
338 B
JavaScript
(function(root){
|
|
var assert = function (title, expect, actual) {
|
|
if(expect == actual)
|
|
console.log(title + ': true');
|
|
else
|
|
console.log(title + ': false', 'Except:' + expect, 'Actual: ' + actual);
|
|
};
|
|
if(typeof(module) != 'undefined')
|
|
global.assert = assert;
|
|
else if(root)
|
|
root.assert = assert;
|
|
})(this);
|