diff --git a/README.md b/README.md index 5cfab10f..1bd0b261 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# cypress-istanbul [![CircleCI](https://circleci.com/gh/cypress-io/cypress-istanbul.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-istanbul) [![renovate-app badge][renovate-badge]][renovate-app] +# @cypress/code-coverage [![renovate-app badge][renovate-badge]][renovate-app] [![CircleCI](https://circleci.com/gh/cypress-io/cypress-istanbul.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-istanbul) -> Saves the code coverage collected from instrumented code +> Saves the code coverage collected during Cypress tests ## Install ```shell -npm install -D cypress-istanbul +npm install -D @cypress/code-coverage ``` and its peer dependencies @@ -17,14 +17,14 @@ npm install -D nyc istanbul-lib-coverage cypress Add to your `cypress/support/index.js` file ```js -import 'cypress-istanbul/support' +import '@cypress/code-coverage/support' ``` Register tasks in your `cypress/plugins/index.js` file ```js module.exports = (on, config) => { - on('task', require('cypress-istanbul/task')) + on('task', require('@cypress/code-coverage/task')) } ``` @@ -56,8 +56,8 @@ Put the following in `cypress/plugins/index.js` file to use `.babelrc` file ```js module.exports = (on, config) => { - on('task', require('cypress-istanbul/task')) - on('file:preprocessor', require('cypress-istanbul/use-babelrc')) + on('task', require('@cypress/code-coverage/task')) + on('file:preprocessor', require('@cypress/code-coverage/use-babelrc')) } ``` @@ -71,7 +71,7 @@ Now the code coverage from spec files will be combined with end-to-end coverage. ## Debugging -Run tests with `DEBUG=cypress-istanbul` environment variable to see log messages +Run tests with `DEBUG=code-coverage` environment variable to see log messages ## License diff --git a/package-lock.json b/package-lock.json index 51a87951..7a8c7a07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "cypress-istanbul", + "name": "@cypress/code-coverage", "version": "0.0.0-development", "lockfileVersion": 1, "requires": true, diff --git a/package.json b/package.json index 2bd07ab3..ce4af088 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "cypress-istanbul", + "name": "@cypress/code-coverage", "version": "0.0.0-development", - "description": "Saves the code coverage collected from instrumented code", + "description": "Saves the code coverage collected during Cypress tests", "main": "index.js", "scripts": { "test": "cypress run", @@ -18,7 +18,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/cypress-io/cypress-istanbul.git" + "url": "https://github.com/cypress-io/code-coverage.git" }, "keywords": [ "cypress", @@ -30,9 +30,9 @@ "author": "Gleb Bahmutov ", "license": "MIT", "bugs": { - "url": "https://github.com/cypress-io/cypress-istanbul/issues" + "url": "https://github.com/cypress-io/code-coverage/issues" }, - "homepage": "https://github.com/cypress-io/cypress-istanbul#readme", + "homepage": "https://github.com/cypress-io/code-coverage#readme", "files": [ "*.js" ], diff --git a/task.js b/task.js index 6131d1c0..5b4264e0 100644 --- a/task.js +++ b/task.js @@ -2,7 +2,7 @@ const istanbul = require('istanbul-lib-coverage') const { join } = require('path') const { existsSync, mkdirSync, readFileSync, writeFileSync } = require('fs') const execa = require('execa') -const debug = require('debug')('cypress-istanbul') +const debug = require('debug')('code-coverage') // these are standard folder and file names used by NYC tools const outputFolder = '.nyc_output'