cypress-io / cypress-react-unit-test

Unit test React components using Cypress

Home Page:https://glebbahmutov.com/blog/my-vision-for-component-tests/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code coverage is missing for TS webpack in test runner

bahmutov opened this issue ยท comments

commented

Have the same issue. Do you plan to add/fix this ?

So we will try to insert instrumentation plugin automatically, here is how I would fix it right now

// webpack config js file
rules: [
  {
    test: /\.(ts|tsx)$/,
    loader: 'babel-loader',
    options: {
      presets: ['@babel/preset-env', '@babel/preset-react'],
      plugins: [
        '@babel/plugin-proposal-class-properties',
        // we want to instrument unit tests on the fly
        'babel-plugin-istanbul',
      ],
    },
  },

๐ŸŽ‰ This issue has been resolved in version 4.3.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

same problem, I tried to configure the webpack config, but it's not working.
image