diff options
Diffstat (limited to 'Libraries/LibJS/Tests/operators/delete-globalThis-property-crash.js')
-rw-r--r-- | Libraries/LibJS/Tests/operators/delete-globalThis-property-crash.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Libraries/LibJS/Tests/operators/delete-globalThis-property-crash.js b/Libraries/LibJS/Tests/operators/delete-globalThis-property-crash.js index 4738197327..1a51bd6962 100644 --- a/Libraries/LibJS/Tests/operators/delete-globalThis-property-crash.js +++ b/Libraries/LibJS/Tests/operators/delete-globalThis-property-crash.js @@ -1,10 +1,8 @@ -load("test-common.js"); +a = 1; -try { - a = 1; - assert(delete globalThis.a === true); - a = 2; - console.log("PASS"); -} catch (e) { - console.log("FAIL: " + e); -} +test("basic functionality", () => { + expect(delete globalThis.a).toBeTrue(); + expect(() => { + a = 2; + }).not.toThrow(); +}); |