mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-15 22:34:51 +00:00
24 lines
284 B
JavaScript
24 lines
284 B
JavaScript
|
/*\
|
||
|
title: test.js
|
||
|
type: application/javascript
|
||
|
module-type: library
|
||
|
|
||
|
testing lib
|
||
|
|
||
|
\*/
|
||
|
|
||
|
|
||
|
exports.assert = function(cond, msg) {
|
||
|
if(!cond) {
|
||
|
if(msg) {
|
||
|
throw msg
|
||
|
} else {
|
||
|
throw "ASSERT FAILED"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
exports.print = function() {
|
||
|
console.log.apply(console, arguments);
|
||
|
}
|