Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After integrating Cypress code coverage into Nuxt3, the app is not working properly #613

Closed
belwalshubham opened this issue Dec 24, 2022 · 1 comment

Comments

@belwalshubham
Copy link

I'm using the Vite Istanbul plugin to integrate cypress code coverage into my nuxt3 app. I'm getting the code coverage report, but my Nuxt3 app is not being compiled and is not functioning properly.
In our most recent version, we have the following code inside the Vite-Plugin-Istanbul folder:

transform(srcCode, id, options) {
      if (!enabled || options?.ssr || id.startsWith(MODULE_PREFIX) || id.startsWith(NULL_STRING)) {
        return;
      }
      if (testExclude.shouldInstrument(id)) {
        const sourceMap = sanitizeSourceMap(this.getCombinedSourcemap());
        const code = instrumenter.instrumentSync(srcCode, id, sourceMap);
        const map = instrumenter.lastSourceMap();
        return { code, map };
      }
    }

Though I'm getting options.ssr value as both true & false for different files, when I run npm run dev, my app does not run properly, and an error message appears on the console, as shown in the screenshot below.

error code coverage

@belwalshubham
Copy link
Author

The problem has been resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant