mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibJS: Indent tests with 4 spaces instead of 2
This commit is contained in:
parent
15de2eda2b
commit
1ef573eb30
261 changed files with 8536 additions and 8497 deletions
|
@ -1,45 +1,45 @@
|
|||
test("iterate through empty string", () => {
|
||||
const a = [];
|
||||
for (const property in "") {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual([]);
|
||||
const a = [];
|
||||
for (const property in "") {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual([]);
|
||||
});
|
||||
|
||||
test("iterate through number", () => {
|
||||
const a = [];
|
||||
for (const property in 123) {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual([]);
|
||||
const a = [];
|
||||
for (const property in 123) {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual([]);
|
||||
});
|
||||
|
||||
test("iterate through empty object", () => {
|
||||
const a = [];
|
||||
for (const property in {}) {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual([]);
|
||||
const a = [];
|
||||
for (const property in {}) {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual([]);
|
||||
});
|
||||
|
||||
test("iterate through string", () => {
|
||||
const a = [];
|
||||
for (const property in "hello") {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual(["0", "1", "2", "3", "4"]);
|
||||
const a = [];
|
||||
for (const property in "hello") {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual(["0", "1", "2", "3", "4"]);
|
||||
});
|
||||
|
||||
test("iterate through object", () => {
|
||||
const a = [];
|
||||
for (const property in { a: 1, b: 2, c: 2 }) {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual(["a", "b", "c"]);
|
||||
const a = [];
|
||||
for (const property in { a: 1, b: 2, c: 2 }) {
|
||||
a.push(property);
|
||||
}
|
||||
expect(a).toEqual(["a", "b", "c"]);
|
||||
});
|
||||
|
||||
test("use already-declared variable", () => {
|
||||
var property;
|
||||
for (property in "abc");
|
||||
expect(property).toBe("2");
|
||||
var property;
|
||||
for (property in "abc");
|
||||
expect(property).toBe("2");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue