stryker-mutator / stryker-js

Mutation testing for JavaScript and friends
https://stryker-mutator.io
Apache License 2.0
2.56k stars 241 forks source link

One or more tests resulted in an error: in node_modules #4029

Open guilhermerodpais opened 1 year ago

guilhermerodpais commented 1 year ago

Summary

Hey, i'm trying to run stryker in my repo, but i get a error in node_modules, what can it be? I already tried disableTypeChecks, but it didn't work. Any sugestions?

ERROR DryRunExecutor One or more tests resulted in an error: undefined TypeError: Cannot read properties of undefined (reading 'navigator')

at detachClipboardStubFromView (/Users/guilherme/projects/xxxxx.Front/node_modules/@testing-library/user-event/dist/cjs/utils/dataTransfer/Clipboard.js:112:32)

Stryker config

/ @type {import('@stryker-mutator/api/core').PartialStrykerOptions} */ const config = { mutate: [ 'packages///src/*/.{js,jsx,ts,tsx}', '!/.test.', '!packages///src/mocks/', '!packages///src/tests/', '!packages///src/tests/', '!/out/', '!/.next/', '!/coverage/', '!node_modules/', '!/*.json', '!*/.md', '!/*.d.{js, ts}', '!*/.eslintrc.{js, ts}', '!build/' ], commandRunner: { command: "npx yarn jest --coverage --env=jsdom", }, _comment: "This config was generated using 'stryker init'. Please take a look at: https://stryker-mutator.io/docs/stryker-js/configuration/ for more information.", packageManager: 'yarn', reporters: ['html', 'clear-text', 'progress'], testRunner: 'jest', testRunner_comment: "Take a look at (missing 'homepage' URL in package.json) for information about the command plugin.", coverageAnalysis: 'perTest', transpilers: ['typescript'], mutator: 'typescript', tsconfigFile: './tsconfig.json', jest: { projectType: 'custom', configFile: './jest.config.js', enableFindRelatedTests: false }, cleanTempDir: true, disableTypeChecks: '/*.{js,ts,jsx,tsx,html,vue}', fileLogLevel: 'error' }; export default config;

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.