mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:18:12 +00:00
Base+LibJS+LibWeb: Make prettier clean
Also use "// prettier-ignore" comments where necessary rather than excluding whole files (via .prettierignore).
This commit is contained in:
parent
76239f89c2
commit
5122f98198
24 changed files with 100 additions and 79 deletions
|
@ -1,6 +1,3 @@
|
|||
// This file must not be formatted by prettier. Make sure your IDE
|
||||
// respects the .prettierignore file!
|
||||
|
||||
test("non strict-mode by default", () => {
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
});
|
||||
|
@ -10,21 +7,25 @@ test("use strict with double quotes", () => {
|
|||
expect(isStrictMode()).toBeTrue();
|
||||
});
|
||||
|
||||
// prettier-ignore
|
||||
test("use strict with single quotes", () => {
|
||||
'use strict';
|
||||
expect(isStrictMode()).toBeTrue();
|
||||
});
|
||||
|
||||
// prettier-ignore
|
||||
test("use strict with backticks does not yield strict mode", () => {
|
||||
`use strict`;
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
});
|
||||
|
||||
// prettier-ignore
|
||||
test("use strict with single quotes after statement does not yield strict mode code", () => {
|
||||
;'use strict';
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
});
|
||||
|
||||
// prettier-ignore
|
||||
test("use strict with double quotes after statement does not yield strict mode code", () => {
|
||||
;"use strict";
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
|
@ -39,14 +40,14 @@ strict";
|
|||
test("strict mode propagates down the scope chain", () => {
|
||||
"use strict";
|
||||
expect(isStrictMode()).toBeTrue();
|
||||
(function() {
|
||||
(function () {
|
||||
expect(isStrictMode()).toBeTrue();
|
||||
})();
|
||||
});
|
||||
|
||||
test("strict mode does not propagate up the scope chain", () => {
|
||||
expect(isStrictMode()).toBeFalse();
|
||||
(function() {
|
||||
(function () {
|
||||
"use strict";
|
||||
expect(isStrictMode()).toBeTrue();
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue