testing-library / eslint-plugin-jest-dom

eslint rules for use with jest-dom
MIT License
361 stars 40 forks source link

Results of weekly scheduled smoke test #229

Closed github-actions[bot] closed 2 years ago

github-actions[bot] commented 2 years ago

Detected 9 ESLint reports and/or crashes. Scanned 7632 repositories.

Rules:

Click to expand ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js:342` - Path: `CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js` - [Link](https://github.com/CSCfi/etsin-finder/blob/HEAD/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js#L342) ```js 340 | await Submit.submitDraft() 341 | } catch (e) { > 342 | expect().toBe(true) 343 | } finally { 344 | expect(Submit.error).toBe(undefined) 345 | } ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js:342 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js:27` - Path: `patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js` - [Link](https://github.com/patrick-narciso/transactions-manager/blob/HEAD/src/__tests__/hooks/useLocalStorage.spec.js#L27) ```js 25 | act(() => { 26 | const [storedValue, setValue] = defaultHook('item', { value: 'value' })(); > 27 | expect(storedValue.value).toEqual('value'); 28 | 29 | setValue({ value: 'newValue' }); 30 | ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js:27 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-in-document - Message: `undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx:31` - Path: `skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx` - [Link](https://github.com/skyverge/kodiak-ui/blob/HEAD/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx#L31) ```tsx 29 | const option1 = getByText('Option 1') 30 | > 31 | expect(option1).toBeDefined 32 | expect(getByText('Option 2')).toBeDefined 33 | 34 | fireEvent.click(option1) ``` ``` TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx:31 at Function.from () at Object.fix (/github/workspace/dist/rules/prefer-in-document.js:105:40) at normalizeFixes (/github/workspace/node_modules/eslint/lib/linter/report-translator.js:193:28) at /github/workspace/node_modules/eslint/lib/linter/report-translator.js:364:49 at Object.report (/github/workspace/node_modules/eslint/lib/linter/linter.js:926:41) at check (/github/workspace/dist/rules/prefer-in-document.js:97:15) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) ``` ## Rule: prefer-in-document - Message: `Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/DateField.spec.js:22` - Path: `instacart/Snacks/src/components/Forms/__tests__/DateField.spec.js` - [Link](https://github.com/instacart/Snacks/blob/HEAD/src/components/Forms/__tests__/DateField.spec.js#L22) ```js 20 | ) 21 | > 22 | expect(mounted).toBe.truthy 23 | }) 24 | 25 | it('renders correctly', () => { ``` ``` TypeError: Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/DateField.spec.js:22 at check (/github/workspace/dist/rules/prefer-in-document.js:89:29) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 ``` ## Rule: prefer-in-document - Message: `Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/MaskedTextField.spec.js:31` - Path: `instacart/Snacks/src/components/Forms/__tests__/MaskedTextField.spec.js` - [Link](https://github.com/instacart/Snacks/blob/HEAD/src/components/Forms/__tests__/MaskedTextField.spec.js#L31) ```js 29 | ) 30 | > 31 | expect(mounted).toBe.truthy 32 | }) 33 | 34 | it('renders correctly', () => { ``` ``` TypeError: Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/MaskedTextField.spec.js:31 at check (/github/workspace/dist/rules/prefer-in-document.js:89:29) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 ``` ## Rule: prefer-in-document - Message: `Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/PhoneNumberField.spec.js:22` - Path: `instacart/Snacks/src/components/Forms/__tests__/PhoneNumberField.spec.js` - [Link](https://github.com/instacart/Snacks/blob/HEAD/src/components/Forms/__tests__/PhoneNumberField.spec.js#L22) ```js 20 | ) 21 | > 22 | expect(mounted).toBe.truthy 23 | }) 24 | 25 | it('renders correctly', () => { ``` ``` TypeError: Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/PhoneNumberField.spec.js:22 at check (/github/workspace/dist/rules/prefer-in-document.js:89:29) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 ``` ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/unboundedsystems/adapt/cloud/test/resourceid.spec.tsx:81` - Path: `unboundedsystems/adapt/cloud/test/resourceid.spec.tsx` - [Link](https://github.com/unboundedsystems/adapt/blob/HEAD/cloud/test/resourceid.spec.tsx#L81) ```tsx 79 | 80 | // Check for correct return type of tuple from resourceIdList > 81 | expect>().toBe(true); 82 | expect>().toBe(false); 83 | expect>().toBe(false); 84 | }); ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/unboundedsystems/adapt/cloud/test/resourceid.spec.tsx:81 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/dashersw/vuelve/test/vuelve.test.js:90` - Path: `dashersw/vuelve/test/vuelve.test.js` - [Link](https://github.com/dashersw/vuelve/blob/HEAD/test/vuelve.test.js#L90) ```js 88 | const { val: rv } = vuelve(composable)() 89 | > 90 | expect(rv.value).toBe('hello') 91 | }) 92 | }) 93 | ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/dashersw/vuelve/test/vuelve.test.js:90 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js:21` - Path: `open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js` - [Link](https://github.com/open-source-labs/Recoilize/blob/HEAD/src/app/components/Metrics/__tests__/Visualizer.unit.test.js#L21) ```js 19 | xit('render time should be of type number', () => { 20 | //the type of data being rendered should be a number > 21 | expect().toBe(); 22 | }); 23 | xit('should be of type string', () => { 24 | //that dom element should render a string ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js:21 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ```
github-actions[bot] commented 2 years ago

Detected 5 ESLint reports and/or crashes. Scanned 7972 repositories.

Rules:

Click to expand ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js:27` - Path: `patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js` - [Link](https://github.com/patrick-narciso/transactions-manager/blob/HEAD/src/__tests__/hooks/useLocalStorage.spec.js#L27) ```js 25 | act(() => { 26 | const [storedValue, setValue] = defaultHook('item', { value: 'value' })(); > 27 | expect(storedValue.value).toEqual('value'); 28 | 29 | setValue({ value: 'newValue' }); 30 | ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js:27 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-in-document - Message: `Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/DateField.spec.js:22` - Path: `instacart/Snacks/src/components/Forms/__tests__/DateField.spec.js` - [Link](https://github.com/instacart/Snacks/blob/HEAD/src/components/Forms/__tests__/DateField.spec.js#L22) ```js 20 | ) 21 | > 22 | expect(mounted).toBe.truthy 23 | }) 24 | 25 | it('renders correctly', () => { ``` ``` TypeError: Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/DateField.spec.js:22 at check (/github/workspace/dist/rules/prefer-in-document.js:89:29) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 ``` ## Rule: prefer-in-document - Message: `Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/MaskedTextField.spec.js:31` - Path: `instacart/Snacks/src/components/Forms/__tests__/MaskedTextField.spec.js` - [Link](https://github.com/instacart/Snacks/blob/HEAD/src/components/Forms/__tests__/MaskedTextField.spec.js#L31) ```js 29 | ) 30 | > 31 | expect(mounted).toBe.truthy 32 | }) 33 | 34 | it('renders correctly', () => { ``` ``` TypeError: Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/MaskedTextField.spec.js:31 at check (/github/workspace/dist/rules/prefer-in-document.js:89:29) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 ``` ## Rule: prefer-in-document - Message: `Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/PhoneNumberField.spec.js:22` - Path: `instacart/Snacks/src/components/Forms/__tests__/PhoneNumberField.spec.js` - [Link](https://github.com/instacart/Snacks/blob/HEAD/src/components/Forms/__tests__/PhoneNumberField.spec.js#L22) ```js 20 | ) 21 | > 22 | expect(mounted).toBe.truthy 23 | }) 24 | 25 | it('renders correctly', () => { ``` ``` TypeError: Cannot read property 'length' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/instacart/Snacks/src/components/Forms/__tests__/PhoneNumberField.spec.js:22 at check (/github/workspace/dist/rules/prefer-in-document.js:89:29) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 ``` ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js:342` - Path: `CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js` - [Link](https://github.com/CSCfi/etsin-finder/blob/HEAD/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js#L342) ```js 340 | await Submit.submitDraft() 341 | } catch (e) { > 342 | expect().toBe(true) 343 | } finally { 344 | expect(Submit.error).toBe(undefined) 345 | } ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js:342 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ```
github-actions[bot] commented 2 years ago

Detected 5 ESLint reports and/or crashes. Scanned 6980 repositories.

Rules:

Click to expand ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/dashersw/vuelve/test/vuelve.test.js:90` - Path: `dashersw/vuelve/test/vuelve.test.js` - [Link](https://github.com/dashersw/vuelve/blob/HEAD/test/vuelve.test.js#L90) ```js 88 | const { val: rv } = vuelve(composable)() 89 | > 90 | expect(rv.value).toBe('hello') 91 | }) 92 | }) 93 | ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/dashersw/vuelve/test/vuelve.test.js:90 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/Automattic/wp-calypso/packages/data-stores/src/plans/test/resolvers.ts:44` - Path: `Automattic/wp-calypso/packages/data-stores/src/plans/test/resolvers.ts` - [Link](https://github.com/Automattic/wp-calypso/blob/HEAD/packages/data-stores/src/plans/test/resolvers.ts#L44) ```ts 42 | MockData.API_PLAN_PRICE_PREMIUM_MONTHLY, 43 | ]; > 44 | expect( ( iter.next as PlanPriceApiDataIterator )( planPriceApiData ).value ).toEqual( { 45 | type: 'FETCH_AND_PARSE', 46 | resource: `https://public-api.wordpress.com/wpcom/v2/plans/details?locale=${ MOCK_LOCALE }`, 47 | options: { ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/Automattic/wp-calypso/packages/data-stores/src/plans/test/resolvers.ts:44 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-in-document - Message: `undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx:31` - Path: `skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx` - [Link](https://github.com/skyverge/kodiak-ui/blob/HEAD/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx#L31) ```tsx 29 | const option1 = getByText('Option 1') 30 | > 31 | expect(option1).toBeDefined 32 | expect(getByText('Option 2')).toBeDefined 33 | 34 | fireEvent.click(option1) ``` ``` TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx:31 at Function.from () at Object.fix (/github/workspace/dist/rules/prefer-in-document.js:105:40) at normalizeFixes (/github/workspace/node_modules/eslint/lib/linter/report-translator.js:193:28) at /github/workspace/node_modules/eslint/lib/linter/report-translator.js:364:49 at Object.report (/github/workspace/node_modules/eslint/lib/linter/linter.js:926:41) at check (/github/workspace/dist/rules/prefer-in-document.js:97:15) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts:9` - Path: `VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts` - [Link](https://github.com/VertaAI/modeldb/blob/HEAD/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts#L9) ```ts 7 | it('should generate path from segments', () => { 8 | const res = makePath('repositories', 'create')(); > 9 | expect(res.value).toEqual('/repositories/create'); 10 | }); 11 | 12 | it('should generate path with simple params', () => { ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts:9 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js:21` - Path: `open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js` - [Link](https://github.com/open-source-labs/Recoilize/blob/HEAD/src/app/components/Metrics/__tests__/Visualizer.unit.test.js#L21) ```js 19 | xit('render time should be of type number', () => { 20 | //the type of data being rendered should be a number > 21 | expect().toBe(); 22 | }); 23 | xit('should be of type string', () => { 24 | //that dom element should render a string ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js:21 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ```
github-actions[bot] commented 2 years ago

Detected 7 ESLint reports and/or crashes. Scanned 8787 repositories.

Rules:

Click to expand ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js:21` - Path: `open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js` - [Link](https://github.com/open-source-labs/Recoilize/blob/HEAD/src/app/components/Metrics/__tests__/Visualizer.unit.test.js#L21) ```js 19 | xit('render time should be of type number', () => { 20 | //the type of data being rendered should be a number > 21 | expect().toBe(); 22 | }); 23 | xit('should be of type string', () => { 24 | //that dom element should render a string ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/open-source-labs/Recoilize/src/app/components/Metrics/__tests__/Visualizer.unit.test.js:21 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ``` ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js:342` - Path: `CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js` - [Link](https://github.com/CSCfi/etsin-finder/blob/HEAD/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js#L342) ```js 340 | await Submit.submitDraft() 341 | } catch (e) { > 342 | expect().toBe(true) 343 | } finally { 344 | expect(Submit.error).toBe(undefined) 345 | } ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js:342 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/Automattic/wp-calypso/packages/data-stores/src/plans/test/resolvers.ts:44` - Path: `Automattic/wp-calypso/packages/data-stores/src/plans/test/resolvers.ts` - [Link](https://github.com/Automattic/wp-calypso/blob/HEAD/packages/data-stores/src/plans/test/resolvers.ts#L44) ```ts 42 | MockData.API_PLAN_PRICE_PREMIUM_MONTHLY, 43 | ]; > 44 | expect( ( iter.next as PlanPriceApiDataIterator )( planPriceApiData ).value ).toEqual( { 45 | type: 'FETCH_AND_PARSE', 46 | resource: `https://public-api.wordpress.com/wpcom/v2/plans/details?locale=${ MOCK_LOCALE }`, 47 | options: { ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/Automattic/wp-calypso/packages/data-stores/src/plans/test/resolvers.ts:44 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts:9` - Path: `VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts` - [Link](https://github.com/VertaAI/modeldb/blob/HEAD/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts#L9) ```ts 7 | it('should generate path from segments', () => { 8 | const res = makePath('repositories', 'create')(); > 9 | expect(res.value).toEqual('/repositories/create'); 10 | }); 11 | 12 | it('should generate path with simple params', () => { ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts:9 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/unboundedsystems/adapt/cloud/test/resourceid.spec.tsx:81` - Path: `unboundedsystems/adapt/cloud/test/resourceid.spec.tsx` - [Link](https://github.com/unboundedsystems/adapt/blob/HEAD/cloud/test/resourceid.spec.tsx#L81) ```tsx 79 | 80 | // Check for correct return type of tuple from resourceIdList > 81 | expect>().toBe(true); 82 | expect>().toBe(false); 83 | expect>().toBe(false); 84 | }); ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/unboundedsystems/adapt/cloud/test/resourceid.spec.tsx:81 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/dashersw/vuelve/test/vuelve.test.js:90` - Path: `dashersw/vuelve/test/vuelve.test.js` - [Link](https://github.com/dashersw/vuelve/blob/HEAD/test/vuelve.test.js#L90) ```js 88 | const { val: rv } = vuelve(composable)() 89 | > 90 | expect(rv.value).toBe('hello') 91 | }) 92 | }) 93 | ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/dashersw/vuelve/test/vuelve.test.js:90 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-in-document - Message: `undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx:31` - Path: `skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx` - [Link](https://github.com/skyverge/kodiak-ui/blob/HEAD/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx#L31) ```tsx 29 | const option1 = getByText('Option 1') 30 | > 31 | expect(option1).toBeDefined 32 | expect(getByText('Option 2')).toBeDefined 33 | 34 | fireEvent.click(option1) ``` ``` TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx:31 at Function.from () at Object.fix (/github/workspace/dist/rules/prefer-in-document.js:105:40) at normalizeFixes (/github/workspace/node_modules/eslint/lib/linter/report-translator.js:193:28) at /github/workspace/node_modules/eslint/lib/linter/report-translator.js:364:49 at Object.report (/github/workspace/node_modules/eslint/lib/linter/linter.js:926:41) at check (/github/workspace/dist/rules/prefer-in-document.js:97:15) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) ```
github-actions[bot] commented 2 years ago

Detected 6 ESLint reports and/or crashes. Scanned 7605 repositories.

Rules:

Click to expand ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/unboundedsystems/adapt/cloud/test/resourceid.spec.tsx:81` - Path: `unboundedsystems/adapt/cloud/test/resourceid.spec.tsx` - [Link](https://github.com/unboundedsystems/adapt/blob/HEAD/cloud/test/resourceid.spec.tsx#L81) ```tsx 79 | 80 | // Check for correct return type of tuple from resourceIdList > 81 | expect>().toBe(true); 82 | expect>().toBe(false); 83 | expect>().toBe(false); 84 | }); ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/unboundedsystems/adapt/cloud/test/resourceid.spec.tsx:81 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ``` ## Rule: prefer-in-document - Message: `Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js:342` - Path: `CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js` - [Link](https://github.com/CSCfi/etsin-finder/blob/HEAD/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js#L342) ```js 340 | await Submit.submitDraft() 341 | } catch (e) { > 342 | expect().toBe(true) 343 | } finally { 344 | expect(Submit.error).toBe(undefined) 345 | } ``` ``` TypeError: Cannot read property 'type' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/CSCfi/etsin-finder/etsin_finder/frontend/__tests__/stores/view/qvain.apiv2.test.js:342 at CallExpression[callee.object.callee.name='expect'][callee.property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/], CallExpression[callee.object.callee.name='expect'][callee.object.arguments.0.argument.callee.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/] (/github/workspace/dist/rules/prefer-in-document.js:183:29) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) at /github/workspace/node_modules/eslint/lib/linter/linter.js:960:32 at Array.forEach () ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js:27` - Path: `patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js` - [Link](https://github.com/patrick-narciso/transactions-manager/blob/HEAD/src/__tests__/hooks/useLocalStorage.spec.js#L27) ```js 25 | act(() => { 26 | const [storedValue, setValue] = defaultHook('item', { value: 'value' })(); > 27 | expect(storedValue.value).toEqual('value'); 28 | 29 | setValue({ value: 'newValue' }); 30 | ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/patrick-narciso/transactions-manager/src/__tests__/hooks/useLocalStorage.spec.js:27 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-in-document - Message: `undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx:31` - Path: `skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx` - [Link](https://github.com/skyverge/kodiak-ui/blob/HEAD/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx#L31) ```tsx 29 | const option1 = getByText('Option 1') 30 | > 31 | expect(option1).toBeDefined 32 | expect(getByText('Option 2')).toBeDefined 33 | 34 | fireEvent.click(option1) ``` ``` TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/skyverge/kodiak-ui/packages/autocomplete/src/__tests__/Autocomplete.spec.tsx:31 at Function.from () at Object.fix (/github/workspace/dist/rules/prefer-in-document.js:105:40) at normalizeFixes (/github/workspace/node_modules/eslint/lib/linter/report-translator.js:193:28) at /github/workspace/node_modules/eslint/lib/linter/report-translator.js:364:49 at Object.report (/github/workspace/node_modules/eslint/lib/linter/linter.js:926:41) at check (/github/workspace/dist/rules/prefer-in-document.js:97:15) at MemberExpression[object.callee.name=expect][property.name=/^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/][object.arguments.0.type=Identifier] (/github/workspace/dist/rules/prefer-in-document.js:171:7) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/dashersw/vuelve/test/vuelve.test.js:90` - Path: `dashersw/vuelve/test/vuelve.test.js` - [Link](https://github.com/dashersw/vuelve/blob/HEAD/test/vuelve.test.js#L90) ```js 88 | const { val: rv } = vuelve(composable)() 89 | > 90 | expect(rv.value).toBe('hello') 91 | }) 92 | }) 93 | ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/dashersw/vuelve/test/vuelve.test.js:90 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ``` ## Rule: prefer-to-have-value - Message: `Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts:9` - Path: `VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts` - [Link](https://github.com/VertaAI/modeldb/blob/HEAD/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts#L9) ```ts 7 | it('should generate path from segments', () => { 8 | const res = makePath('repositories', 'create')(); > 9 | expect(res.value).toEqual('/repositories/create'); 10 | }); 11 | 12 | it('should generate path with simple params', () => { ``` ``` TypeError: Cannot read property 'name' of undefined Occurred while linting /github/workspace/node_modules/eslint-remote-tester/.cache-eslint-remote-tester/VertaAI/modeldb/webapp/client/src/shared/routes/pathBuilder/__tests__/pathBuilder.test.ts:9 at getQueryNodeFrom (/github/workspace/dist/assignment-ast.js:88:68) at isValidQueryNode (/github/workspace/dist/rules/prefer-to-have-value.js:38:45) at CallExpression[callee.property.name=/to(Be|(Strict)?Equal)$/][callee.object.arguments.0.property.name=value][callee.object.callee.name=expect] (/github/workspace/dist/rules/prefer-to-have-value.js:51:11) at /github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach () at Object.emit (/github/workspace/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:293:26) at NodeEventGenerator.applySelectors (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:322:22) at NodeEventGenerator.enterNode (/github/workspace/node_modules/eslint/lib/linter/node-event-generator.js:336:14) at CodePathAnalyzer.enterNode (/github/workspace/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23) ```
MichaelDeBoey commented 2 years ago

Closed by #242 & #243