mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-25 19:02:07 -05:00
LibJS: Uncomment passing tests
This commit is contained in:
parent
5f0d3c083f
commit
7ac6af1998
2 changed files with 4 additions and 5 deletions
|
@ -1,11 +1,11 @@
|
||||||
test("basic functionality", () => {
|
test("basic functionality", () => {
|
||||||
const local = Symbol("foo");
|
const local = Symbol("foo");
|
||||||
// const global = Symbol.for("foo");
|
const global = Symbol.for("foo");
|
||||||
expect(local.valueOf()).toBe(local);
|
expect(local.valueOf()).toBe(local);
|
||||||
// expect(global.valueOf()).toBe(global);
|
expect(global.valueOf()).toBe(global);
|
||||||
|
|
||||||
expect(Symbol.prototype.valueOf.call(local)).toBe(local);
|
expect(Symbol.prototype.valueOf.call(local)).toBe(local);
|
||||||
// expect(Symbol.prototype.valueOf.call(global)).toBe(global);
|
expect(Symbol.prototype.valueOf.call(global)).toBe(global);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("|this| must be a symbol", () => {
|
test("|this| must be a symbol", () => {
|
||||||
|
|
|
@ -10,8 +10,7 @@ test("parse optional-chaining", () => {
|
||||||
expect("a?.b?.``").not.toEval();
|
expect("a?.b?.``").not.toEval();
|
||||||
expect("new Foo?.bar").not.toEval();
|
expect("new Foo?.bar").not.toEval();
|
||||||
expect("new (Foo?.bar)").toEval();
|
expect("new (Foo?.bar)").toEval();
|
||||||
// FIXME: This should pass.
|
expect("(new Foo)?.bar").toEval();
|
||||||
// expect("(new Foo)?.bar").toEval();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test("evaluate optional-chaining", () => {
|
test("evaluate optional-chaining", () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue