cypress-io / cypress-grep

Filter tests using substring
137 stars 19 forks source link

TypeError: grep.trim is not a function with grep=<Number> #91

Closed VolodymyrLykhachov closed 2 years ago

VolodymyrLykhachov commented 2 years ago

npx cypress run --env grep=1

The function exported by the plugins file threw an error.

We invoked the function exported by Path\cypress\plugins\index.js, but it threw an error.

TypeError: grep.trim is not a function at cypressGrepPlugin (Path\node_modules\cypress-grep\src\plugin.js:21:70) at module.exports (Path\cypress\plugins\index.js:57:39) at Path\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:90:12 at tryCatcher (Path\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\util.js:16:23) at Function.Promise.attempt.Promise.try (Path\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\method.js:39:29) at load (Path\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:87:7) at EventEmitter. (Path\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:198:5) at EventEmitter.emit (node:events:390:28) at process. (Path\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22) at process.emit (node:events:390:28) at process.emit (Path\Cypress\Cache\9.0.0\Cypress\resources\app\packages\server\node_modules\source-map-support\source-map-support.js:495:21) at emit (node:internal/child_process:917:12) at processTicksAndRejections (node:internal/process/task_queues:84:21)

Works fine with grep=

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 2.10.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: