|
| 1 | +--- |
| 2 | +source: crates/oxc_linter/src/tester.rs |
| 3 | +--- |
| 4 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 5 | + ╭─[no_standalone_expect.tsx:1:29] |
| 6 | + 1 │ (() => {})('testing', () => expect(true).toBe(false)) |
| 7 | + · ────── |
| 8 | + ╰──── |
| 9 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 10 | + |
| 11 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 12 | + ╭─[no_standalone_expect.tsx:1:1] |
| 13 | + 1 │ expect.hasAssertions() |
| 14 | + · ────── |
| 15 | + ╰──── |
| 16 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 17 | + |
| 18 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 19 | + ╭─[no_standalone_expect.tsx:1:1] |
| 20 | + 1 │ expect().hasAssertions() |
| 21 | + · ────── |
| 22 | + ╰──── |
| 23 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 24 | + |
| 25 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 26 | + ╭─[no_standalone_expect.tsx:4:40] |
| 27 | + 3 │ const t = Math.random() ? it.only : it; |
| 28 | + 4 │ t('testing', () => expect(true).toBe(false)); |
| 29 | + · ────── |
| 30 | + 5 │ }); |
| 31 | + ╰──── |
| 32 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 33 | + |
| 34 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 35 | + ╭─[no_standalone_expect.tsx:4:40] |
| 36 | + 3 │ const t = Math.random() ? it.only : it; |
| 37 | + 4 │ t('testing', () => expect(true).toBe(false)); |
| 38 | + · ────── |
| 39 | + 5 │ }); |
| 40 | + ╰──── |
| 41 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 42 | + |
| 43 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 44 | + ╭─[no_standalone_expect.tsx:7:21] |
| 45 | + 6 │ ]).test('returns the result of adding %d to %d', (a, b, expected) => { |
| 46 | + 7 │ expect(a + b).toBe(expected); |
| 47 | + · ────── |
| 48 | + 8 │ }); |
| 49 | + ╰──── |
| 50 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 51 | + |
| 52 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 53 | + ╭─[no_standalone_expect.tsx:7:21] |
| 54 | + 6 │ ]).test('returns the result of adding %d to %d', (a, b, expected) => { |
| 55 | + 7 │ expect(a + b).toBe(expected); |
| 56 | + · ────── |
| 57 | + 8 │ }); |
| 58 | + ╰──── |
| 59 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 60 | + |
| 61 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 62 | + ╭─[no_standalone_expect.tsx:7:21] |
| 63 | + 6 │ ]).test('returns the result of adding %d to %d', (a, b, expected) => { |
| 64 | + 7 │ expect(a + b).toBe(expected); |
| 65 | + · ────── |
| 66 | + 8 │ }); |
| 67 | + ╰──── |
| 68 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 69 | + |
| 70 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 71 | + ╭─[no_standalone_expect.tsx:1:28] |
| 72 | + 1 │ describe('a test', () => { expect(1).toBe(1); }); |
| 73 | + · ────── |
| 74 | + ╰──── |
| 75 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 76 | + |
| 77 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 78 | + ╭─[no_standalone_expect.tsx:1:26] |
| 79 | + 1 │ describe('a test', () => expect(1).toBe(1)); |
| 80 | + · ────── |
| 81 | + ╰──── |
| 82 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 83 | + |
| 84 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 85 | + ╭─[no_standalone_expect.tsx:1:71] |
| 86 | + 1 │ describe('a test', () => { const func = () => { expect(1).toBe(1); }; expect(1).toBe(1); }); |
| 87 | + · ────── |
| 88 | + ╰──── |
| 89 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 90 | + |
| 91 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 92 | + ╭─[no_standalone_expect.tsx:1:63] |
| 93 | + 1 │ describe('a test', () => { it(() => { expect(1).toBe(1); }); expect(1).toBe(1); }); |
| 94 | + · ────── |
| 95 | + ╰──── |
| 96 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 97 | + |
| 98 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 99 | + ╭─[no_standalone_expect.tsx:1:1] |
| 100 | + 1 │ expect(1).toBe(1); |
| 101 | + · ────── |
| 102 | + ╰──── |
| 103 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 104 | + |
| 105 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 106 | + ╭─[no_standalone_expect.tsx:1:2] |
| 107 | + 1 │ {expect(1).toBe(1)} |
| 108 | + · ────── |
| 109 | + ╰──── |
| 110 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 111 | + |
| 112 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 113 | + ╭─[no_standalone_expect.tsx:1:70] |
| 114 | + 1 │ it.each([1, true])('trues', value => { expect(value).toBe(true); }); expect(1).toBe(1); |
| 115 | + · ────── |
| 116 | + ╰──── |
| 117 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 118 | + |
| 119 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 120 | + ╭─[no_standalone_expect.tsx:1:46] |
| 121 | + 1 │ describe.each([1, true])('trues', value => { expect(value).toBe(true); }); |
| 122 | + · ────── |
| 123 | + ╰──── |
| 124 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 125 | + |
| 126 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 127 | + ╭─[no_standalone_expect.tsx:3:44] |
| 128 | + 2 │ import { expect as pleaseExpect } from '@jest/globals'; |
| 129 | + 3 │ describe('a test', () => { pleaseExpect(1).toBe(1); }); |
| 130 | + · ──────────── |
| 131 | + 4 │ |
| 132 | + ╰──── |
| 133 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
| 134 | + |
| 135 | + ⚠ eslint-plugin-jest(no-standalone-expect): Expect must be inside of a test block. |
| 136 | + ╭─[no_standalone_expect.tsx:3:34] |
| 137 | + 2 │ import { expect as pleaseExpect } from '@jest/globals'; |
| 138 | + 3 │ beforeEach(() => pleaseExpect.hasAssertions()); |
| 139 | + · ──────────── |
| 140 | + 4 │ |
| 141 | + ╰──── |
| 142 | + help: Did you forget to wrap `expect` in a `test` or `it` block? |
0 commit comments