diff options
Diffstat (limited to 'Libraries/LibJS/Tests/functions/constructor-basic.js')
-rw-r--r-- | Libraries/LibJS/Tests/functions/constructor-basic.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Libraries/LibJS/Tests/functions/constructor-basic.js b/Libraries/LibJS/Tests/functions/constructor-basic.js index 669bc77d96..c672e71529 100644 --- a/Libraries/LibJS/Tests/functions/constructor-basic.js +++ b/Libraries/LibJS/Tests/functions/constructor-basic.js @@ -1,17 +1,11 @@ -load("test-common.js"); - -try { +test("basic functionality", () => { function Foo() { this.x = 123; } - assert(Foo.prototype.constructor === Foo); - - var foo = new Foo(); - assert(foo.constructor === Foo); - assert(foo.x === 123); + expect(Foo.prototype.constructor).toBe(Foo); - console.log("PASS"); -} catch (e) { - console.log("FAIL: " + e); -} + const foo = new Foo(); + expect(foo.constructor).toBe(Foo); + expect(foo.x).toBe(123); +}); |