mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +00:00
test-js: Use prettier and format all files
This commit is contained in:
parent
e532888242
commit
6d58c48c2f
248 changed files with 8291 additions and 7725 deletions
|
@ -1,39 +1,39 @@
|
|||
test("basic method shorthand", () => {
|
||||
const o = {
|
||||
foo: "bar",
|
||||
getFoo() {
|
||||
return this.foo;
|
||||
},
|
||||
};
|
||||
expect(o.getFoo()).toBe("bar");
|
||||
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");
|
||||
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");
|
||||
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");
|
||||
const o = {
|
||||
foo: "bar",
|
||||
[4 + 10]() {
|
||||
return this.foo;
|
||||
},
|
||||
};
|
||||
expect(o[14]()).toBe("bar");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue