
The addition of assert functions to Userland/js was done before we had load(..) implemented. Now that it exists, it seems like the right move the test helper functions to pure javascript instead of poluting js with random global functions.
15 lines
307 B
JavaScript
15 lines
307 B
JavaScript
load("test-common.js");
|
|
|
|
try {
|
|
var last = 0;
|
|
for (var i = 0; i < 100; ++i) {
|
|
var now = Date.now();
|
|
assert(!isNaN(now))
|
|
assert(now > 1580000000000);
|
|
assert(now >= last);
|
|
last = now;
|
|
}
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|