
Switch the LibJS test suite to use the native assert implementation surfaced inside the js repl when it's launched in test mode.
15 lines
259 B
JavaScript
15 lines
259 B
JavaScript
try {
|
|
assert(typeof this === "object");
|
|
assert(this === global);
|
|
|
|
function Foo() {
|
|
this.x = 5;
|
|
assert(typeof this === "object");
|
|
assert(this.x === 5);
|
|
}
|
|
|
|
new Foo();
|
|
console.log("PASS");
|
|
} catch (err) {
|
|
console.log("FAIL: " + err);
|
|
}
|