@ebi-gene-expression-group/scxa-cell-type-wheel-heatmap

1.3.2 • Public • Published

scxa-cell-type-wheel

Run tests with:

npx cypress run --component

If you want to omit video recording:

npx cypress run --component --record false

Find coverage reports at: ./coverage/lcov-report/index.html

Add code coverage (in a nutshell)

This is an abridged version of https://docs.cypress.io/guides/tooling/code-coverage.

Add the following three packages:

npm install -D babel-plugin-transform-class-properties babel-plugin-istanbul @cypress/code-coverage

Add the two plugins to your .babelrc file:

{
  "presets": ["@babel/preset-react", "@babel/preset-env"],
  "plugins": [ "transform-class-properties", "istanbul" ]
}

Add @cypress/code-coverage in your cypress.config.js file so it looks like this:

const { defineConfig } = require(`cypress`)

module.exports = defineConfig({
  component: {
    setupNodeEvents(on, config) {
      require(`@cypress/code-coverage/task`)(on, config)
      // include any other plugin code...

      // It's IMPORTANT to return the config object
      // with any changed environment variables
      return config
    },
    devServer: {
      framework: `react`,
      bundler: `webpack`
    }
  }
})

Lastly, add the following import to cypress/support/component.js:

import '@cypress/code-coverage/support'

Readme

Keywords

none

Package Sidebar

Install

npm i @ebi-gene-expression-group/scxa-cell-type-wheel-heatmap

Weekly Downloads

1

Version

1.3.2

License

Apache-2.0

Unpacked Size

22.8 kB

Total Files

4

Last publish

Collaborators

  • ebi-karel
  • alfonsomunozpomer
  • lingyun1010
  • haideriqbal
  • ukumbham