chore: update eslint-plugin-unicorn
#14155
Annotations
7 errors and 2 warnings
run tests:
e2e/__tests__/wrongEnv.test.ts#L15
expect(received).toMatchSnapshot()
Snapshot name: `Wrong globals for environment print useful error for window 1`
- Snapshot - 6
+ Received + 6
@@ -8,14 +8,14 @@
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
ReferenceError: window is not defined
- 22 |
23 | test('use window', () => {
- > 24 | const location = window.location;
+ 24 | // eslint-disable-next-line unicorn/prefer-global-this
+ > 25 | const location = window.location;
| ^
- 25 |
+ 26 |
- 26 | console.log(location);
+ 27 | console.log(location);
- 27 |
+ 28 |
- at Object.window (__tests__/node.js:24:20)"
+ at Object.window (__tests__/node.js:25:20)"
at toMatchSnapshot (e2e/__tests__/wrongEnv.test.ts:15:46)
at Object.assertFailuresAndSnapshot (e2e/__tests__/wrongEnv.test.ts:20:5)
|
run tests:
e2e/__tests__/wrongEnv.test.ts#L15
expect(received).toMatchSnapshot()
Snapshot name: `Wrong globals for environment on node <=18 print useful error for navigator 1`
- Snapshot - 7
+ Received + 7
@@ -8,14 +8,14 @@
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
ReferenceError: navigator is not defined
- 30 |
+ 31 |
- 31 | test('use navigator', () => {
+ 32 | test('use navigator', () => {
- > 32 | const userAgent = navigator.userAgent;
+ > 33 | const userAgent = navigator.userAgent;
| ^
- 33 |
+ 34 |
- 34 | console.log(userAgent);
+ 35 | console.log(userAgent);
- 35 |
+ 36 |
- at Object.navigator (__tests__/node.js:32:21)"
+ at Object.navigator (__tests__/node.js:33:21)"
at toMatchSnapshot (e2e/__tests__/wrongEnv.test.ts:15:46)
at Object.assertFailuresAndSnapshot (e2e/__tests__/wrongEnv.test.ts:30:7)
|
run tests:
e2e/__tests__/wrongEnv.test.ts#L15
expect(received).toMatchSnapshot()
Snapshot name: `Wrong globals for environment print useful error for window 1`
- Snapshot - 6
+ Received + 6
@@ -8,14 +8,14 @@
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
ReferenceError: window is not defined
- 22 |
23 | test('use window', () => {
- > 24 | const location = window.location;
+ 24 | // eslint-disable-next-line unicorn/prefer-global-this
+ > 25 | const location = window.location;
| ^
- 25 |
+ 26 |
- 26 | console.log(location);
+ 27 | console.log(location);
- 27 |
+ 28 |
- at Object.window (__tests__/node.js:24:20)"
+ at Object.window (__tests__/node.js:25:20)"
at toMatchSnapshot (e2e/__tests__/wrongEnv.test.ts:15:46)
at Object.assertFailuresAndSnapshot (e2e/__tests__/wrongEnv.test.ts:20:5)
|
run tests:
e2e/__tests__/wrongEnv.test.ts#L15
expect(received).toMatchSnapshot()
Snapshot name: `Wrong globals for environment on node <=18 print useful error for navigator 1`
- Snapshot - 7
+ Received + 7
@@ -8,14 +8,14 @@
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
ReferenceError: navigator is not defined
- 30 |
+ 31 |
- 31 | test('use navigator', () => {
+ 32 | test('use navigator', () => {
- > 32 | const userAgent = navigator.userAgent;
+ > 33 | const userAgent = navigator.userAgent;
| ^
- 33 |
+ 34 |
- 34 | console.log(userAgent);
+ 35 | console.log(userAgent);
- 35 |
+ 36 |
- at Object.navigator (__tests__/node.js:32:21)"
+ at Object.navigator (__tests__/node.js:33:21)"
at toMatchSnapshot (e2e/__tests__/wrongEnv.test.ts:15:46)
at Object.assertFailuresAndSnapshot (e2e/__tests__/wrongEnv.test.ts:30:7)
|
run tests:
e2e/__tests__/wrongEnv.test.ts#L15
expect(received).toMatchSnapshot()
Snapshot name: `Wrong globals for environment print useful error for window 1`
- Snapshot - 6
+ Received + 6
@@ -8,14 +8,14 @@
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
ReferenceError: window is not defined
- 22 |
23 | test('use window', () => {
- > 24 | const location = window.location;
+ 24 | // eslint-disable-next-line unicorn/prefer-global-this
+ > 25 | const location = window.location;
| ^
- 25 |
+ 26 |
- 26 | console.log(location);
+ 27 | console.log(location);
- 27 |
+ 28 |
- at Object.window (__tests__/node.js:24:20)"
+ at Object.window (__tests__/node.js:25:20)"
at toMatchSnapshot (e2e/__tests__/wrongEnv.test.ts:15:46)
at Object.assertFailuresAndSnapshot (e2e/__tests__/wrongEnv.test.ts:20:5)
|
run tests:
e2e/__tests__/wrongEnv.test.ts#L15
expect(received).toMatchSnapshot()
Snapshot name: `Wrong globals for environment on node <=18 print useful error for navigator 1`
- Snapshot - 7
+ Received + 7
@@ -8,14 +8,14 @@
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment.
ReferenceError: navigator is not defined
- 30 |
+ 31 |
- 31 | test('use navigator', () => {
+ 32 | test('use navigator', () => {
- > 32 | const userAgent = navigator.userAgent;
+ > 33 | const userAgent = navigator.userAgent;
| ^
- 33 |
+ 34 |
- 34 | console.log(userAgent);
+ 35 | console.log(userAgent);
- 35 |
+ 36 |
- at Object.navigator (__tests__/node.js:32:21)"
+ at Object.navigator (__tests__/node.js:33:21)"
at toMatchSnapshot (e2e/__tests__/wrongEnv.test.ts:15:46)
at Object.assertFailuresAndSnapshot (e2e/__tests__/wrongEnv.test.ts:30:7)
|
run tests
Final attempt failed. Child_process exited with error code 1
|
run tests
Attempt 1 failed. Reason: Child_process exited with error code 1
|
run tests
Attempt 2 failed. Reason: Child_process exited with error code 1
|
Loading