Skip to content

There are some uncovered lines for Vue 3 templates with Typescript #11

Open
@gtrombitas

Description

There is a testing extension for Quasar Framework that introduces code-coverage support for Cypress e2e testing: link
I created a Pull Request for introducing Webpack code coverage support for this library: link
@maiolica highlighted that there some issues with the covered lines for .vue template files but there aren't with .ts files.
I've looked into it and I've had the same results in my template files.

Screenshot 2022-07-19 at 12 07 43

I used the following webpack loader rule to instrument the code:

{
          test: /\.(js|ts|vue)$/,
          loader: '@jsdevtools/coverage-istanbul-loader',
          options: { esModules: true },
          enforce: 'post',
          exclude: [/\.(e2e|spec)\.(js|ts)$/, /node_modules/, /\.quasar/],
}

What could be the problem? Do I need to add an another loader to handle .vue files better?

You can test it when you follow the instructions from the PR.

  1. Pull quasar-testing repo.
  2. Checkout dev branch.
  3. yarn install in the root directory.
  4. Follow the instructions from Other information part of the PR to test cypress e2e coverage.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions