You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: Multiple attempts to register the following task(s): resetCoverage, combineCoverage, coverageReport. Only the last attempt will be registered.
────────────────────────────────────────────────────────────────────────────────────────────────────
Running: helloWorld.spec.js (1 of 1)
HelloWorld component
√ works (101ms)
code-coverage parsed sent coverage +0ms
code-coverage wrote coverage file C:\Users\user\Desktop\code\unit-test-3\.nyc_output\out.json +6ms
code-coverage parsed sent coverage +26ms
code-coverage wrote coverage file C:\Users\user\Desktop\code\unit-test-3\.nyc_output\out.json +8ms
code-coverage NYC file C:\Users\user\Desktop\code\unit-test-3\.nyc_output\out.json has 1 key(s) +0ms
code-coverage 1 key C:\Users\user\Desktop\code\unit-test-3\src\helloWorld.spec.js file path C:\Users\user\Desktop\code\unit-test-3\src\helloWorld.spec.js +0ms
code-coverage in file C:\Users\user\Desktop\code\unit-test-3\.nyc_output\out.json all files are not found? false +0ms
code-coverage NYC file C:\Users\user\Desktop\code\unit-test-3\.nyc_output\out.json has 1 key(s) +2ms
code-coverage combined NYC options { 'report-dir': './coverage', reporter: [ 'lcov', 'clover', 'json', 'json-summary' ], extension: [ '.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx' ], excludeAfterRemap: false, exclude: 'src/serviceWorker.js' } +1ms
NYC options: {
'report-dir': './coverage',
reporter: [ 'lcov', 'clover', 'json', 'json-summary', [length]: 4 ],
extension: [ '.js', '.cjs', '.mjs', '.ts', '.tsx', '.jsx', [length]: 6 ],
excludeAfterRemap: false,
exclude: 'src/serviceWorker.js'
}
1) "after all" hook: generateReport for "works"
1 passing (584ms)
1 failing
1) HelloWorld component
"after all" hook: generateReport for "works":
CypressError: `cy.task('coverageReport')` failed with the following error:
> Expected "exclude" to by an array
Because this error occurred during a `after all` hook we are skipping all of the remaining tests.
at http://localhost:63477/__cypress/runner/cypress_runner.js:147082:19
at tryCatcher (http://localhost:63477/__cypress/runner/cypress_runner.js:10384:23)
at Promise._settlePromiseFromHandler (http://localhost:63477/__cypress/runner/cypress_runner.js:8319:31)
at Promise._settlePromise (http://localhost:63477/__cypress/runner/cypress_runner.js:8376:18)
at Promise._settlePromise0 (http://localhost:63477/__cypress/runner/cypress_runner.js:8421:10)
at Promise._settlePromises (http://localhost:63477/__cypress/runner/cypress_runner.js:8497:18)
at _drainQueueStep (http://localhost:63477/__cypress/runner/cypress_runner.js:5091:12)
at _drainQueue (http://localhost:63477/__cypress/runner/cypress_runner.js:5084:9)
at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues (http://localhost:63477/__cypress/runner/cypress_runner.js:5100:5)
at Async.drainQueues (http://localhost:63477/__cypress/runner/cypress_runner.js:4970:14)
From Your Spec Code:
at Context.generateReport (http://localhost:63477/__cypress/tests?p=cypress\support\index.js:433:8)
From Node.js Internals:
Error: Expected "exclude" to by an array
at coverageReport (C:\Users\user\Desktop\code\unit-test-3\node_modules\@cypress\code-coverage\task.js:173:13)
at invoke (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\lib\plugins\child\task.js:41:14)
at C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\lib\plugins\util.js:48:16
at tryCatcher (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\util.js:16:23)
at Function.Promise.attempt.Promise.try (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\node_modules\bluebird\js\release\method.js:39:29)
at Object.wrapChildPromise (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\lib\plugins\util.js:47:28)
at Object.wrap (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\lib\plugins\child\task.js:47:8)
at execute (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:142:12)
at EventEmitter.<anonymous> (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\lib\plugins\child\run_plugins.js:235:5)
at EventEmitter.emit (events.js:210:5)
at process.<anonymous> (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\lib\plugins\util.js:25:29)
at process.emit (events.js:210:5)
at process.emit (C:\Users\user\AppData\Local\Cypress\Cache\4.7.0\Cypress\resources\app\packages\server\node_modules\source-map-support\source-map-support.js:495:21)
at emit (internal/child_process.js:876:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
Versions
What is this plugin's version? "@cypress/code-coverage": "^3.7.6",
What is Cypress version? "cypress": "^4.7.0",
What is your operating system? window 10 Pro 64bit
What is the shell? bash
What is the Node version? v10.16.0
What is the NPM version? npm: 6.9.0, yarn: 1.22.4
How do you instrument your application? "@cypress/instrument-cra": "^1.1.1"
When running tests, if you open the web application in regular browser, and open DevTools, do you see window.__coverage__ object? Can you paste a screenshot?
Logs and screenshots
Versions
"@cypress/code-coverage": "^3.7.6",
"cypress": "^4.7.0",
window 10 Pro 64bit
bash
v10.16.0
"@cypress/instrument-cra": "^1.1.1"
window.__coverage__
object? Can you paste a screenshot?.nyc_output
folder? Is there.nyc_output/out.json
file. Is it empty? Can you paste at least part of it so we can see the keys and file paths?package.json
(nyc
object) or in other NYC config filesNo
Describe the bug
When I type
yarn npx cypress run --spec "src/helloWorld.spec.js"
an error occurs like above.Link to the repo
https://github.com/qkreltms/cypress-react-typescript-example
The text was updated successfully, but these errors were encountered: