Code Monkey home page Code Monkey logo

cy-nested-code-coverage's Introduction

Example using Cypress in subfolder, while the code coverage report tool nyc is installed in the root folder.

Run Cypress tests

npm run cy:open

See cypress-io/code-coverage and Cypress code coverage guide.

Note: to see debug messages from code coverage plugin, run it with

DEBUG=code-coverage npm run cy:open

cy-nested-code-coverage's People

Contributors

bahmutov avatar

Watchers

 avatar

cy-nested-code-coverage's Issues

nyc crashes because .nyc_output is in subfolder frontend

When running npm run cy:open nyc is trying to find the source folder in the root project, while it is saved in the working folder frontend.

Task terminal output

GET /__cypress/tests?p=cypress/support/index.js-483 200 850.223 ms - -
/Users/gleb/git/cy-nested-code-coverage/node_modules/yargs/yargs.js:1163
      else throw err
           ^

Error: ENOENT: no such file or directory, scandir '/Users/gleb/git/cy-nested-code-coverage/.nyc_output'
    at Object.readdirSync (fs.js:795:3)
    at NYC.eachReport (/Users/gleb/git/cy-nested-code-coverage/node_modules/nyc/index.js:559:33)
    at NYC.getCoverageMapFromAllCoverageFiles (/Users/gleb/git/cy-nested-code-coverage/node_modules/nyc/index.js:380:10)
    at NYC.report (/Users/gleb/git/cy-nested-code-coverage/node_modules/nyc/index.js:399:20)
    at Object.exports.handler (/Users/gleb/git/cy-nested-code-coverage/node_modules/nyc/lib/commands/report.js:101:7)
    at Object.runCommand (/Users/gleb/git/cy-nested-code-coverage/node_modules/yargs/lib/command.js:242:26)
    at Object.parseArgs [as _parseArgs] (/Users/gleb/git/cy-nested-code-coverage/node_modules/yargs/yargs.js:1078:30)
    at Object.parse (/Users/gleb/git/cy-nested-code-coverage/node_modules/yargs/yargs.js:566:25)
    at Object.<anonymous> (/Users/gleb/git/cy-nested-code-coverage/node_modules/nyc/bin/nyc.js:19:35)
    at Module._compile (internal/modules/cjs/loader.js:774:30) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/Users/gleb/git/cy-nested-code-coverage/.nyc_output'

GUI error

Screen Shot 2019-09-03 at 8 42 40 PM

DevTools error

Error:     CypressError: cy.task('coverageReport') failed with the following error:

> Error: Command failed: nyc report --report-dir ./coverage --reporter=lcov --reporter=clover --reporter=json
    at makeError (/Users/gleb/git/cy-nested-code-coverage/node_modules/execa/index.js:172:9)
    at Promise.all.then.arr (/Users/gleb/git/cy-nested-code-coverage/node_modules/execa/index.js:277:16)
    at <anonymous>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.