mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +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:
committed by
Andreas Kling
parent
76239f89c2
commit
5122f98198
@@ -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();
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user