mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
Libraries: Move to Userland/Libraries/
This commit is contained in:
parent
dc28c07fa5
commit
13d7c09125
Notes:
sideshowbarker
2024-07-18 23:53:55 +09:00
Author: https://github.com/awesomekling
Commit: 13d7c09125
1857 changed files with 266 additions and 274 deletions
|
@ -1,50 +0,0 @@
|
|||
test("basic method shorthand", () => {
|
||||
const o = {
|
||||
foo: "bar",
|
||||
getFoo() {
|
||||
return this.foo;
|
||||
},
|
||||
};
|
||||
expect(o.getFoo()).toBe("bar");
|
||||
});
|
||||
|
||||
test("numeric literal method shorthand", () => {
|
||||
const o = {
|
||||
foo: "bar",
|
||||
12() {
|
||||
return this.foo;
|
||||
},
|
||||
};
|
||||
expect(o[12]()).toBe("bar");
|
||||
});
|
||||
|
||||
test("string literal method shorthand", () => {
|
||||
const o = {
|
||||
foo: "bar",
|
||||
"hello friends"() {
|
||||
return this.foo;
|
||||
},
|
||||
};
|
||||
expect(o["hello friends"]()).toBe("bar");
|
||||
});
|
||||
|
||||
test("computed property method shorthand", () => {
|
||||
const o = {
|
||||
foo: "bar",
|
||||
[4 + 10]() {
|
||||
return this.foo;
|
||||
},
|
||||
};
|
||||
expect(o[14]()).toBe("bar");
|
||||
});
|
||||
|
||||
test("symbol computed property shorthand", () => {
|
||||
const s = Symbol("foo");
|
||||
const o = {
|
||||
foo: "bar",
|
||||
[s]() {
|
||||
return this.foo;
|
||||
},
|
||||
};
|
||||
expect(o[s]()).toBe("bar");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue