kwonoj / swc-plugin-coverage-instrument

istanbuljs compatible SWC coverage instrumentation plugin
MIT License
85 stars 10 forks source link

Cypress, Next.js, SWC No Coverage Info #211

Closed ImBIOS closed 1 year ago

ImBIOS commented 1 year ago

Msg:

.nyc_output/out.json has no coverage information
Did you forget to instrument your web application?

Env:


  System:
    OS: macOS 13.3.1
    CPU: (8) arm64 Apple M2
    Memory: 88.00 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.15.0 - ~/Library/Caches/fnm_multishells/97689_1681958198993/bin/node
    npm: 9.5.0 - ~/Library/Caches/fnm_multishells/97689_1681958198993/bin/npm
    Watchman: 2023.04.17.00 - /opt/homebrew/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK:
      API Levels: 28, 33, 33
      Build Tools: 27.0.3, 28.0.3, 30.0.3, 33.0.2
  Languages:
    Bash: 3.2.57 - /bin/bash
    Java: 1.8.0_362 - /usr/bin/javac
    Perl: 5.30.3 - /usr/bin/perl
    Python: 3.11.3 - /opt/homebrew/opt/python@3.11/libexec/bin/python
    Python3: 3.11.3 - /opt/homebrew/bin/python3
    Ruby: 2.6.10 - /usr/bin/ruby
  Browsers:
    Chrome: 112.0.5615.121
    Safari: 16.4
  npmPackages:
    @chakra-ui/anatomy: ^2.1.2 => 2.1.2 
    @chakra-ui/react: ^2.4.6 => 2.4.9 
    @chakra-ui/theme-tools: ^2.0.17 => 2.0.17 
    @cypress/code-coverage: ^3.10.4 => 3.10.4 
    @emotion/react: ^11.10.5 => 11.10.5 
    @emotion/styled: ^11.10.5 => 11.10.5 
    @fontsource/roboto: ^4.5.8 => 4.5.8 
    @hookform/resolvers: ^3.0.0 => 3.0.0 
    @next/env: ^13.3.0 => 13.3.0 
    @swc/core: ^1.3.52 => 1.3.52 
    @swc/jest: ^0.2.26 => 0.2.26 
    @testing-library/cypress: ^9.0.0 => 9.0.0 
    @testing-library/jest-dom: ^5.16.5 => 5.16.5 
    @testing-library/react: ^14.0.0 => 14.0.0 
    @types/node: 18.11.18 => 18.11.18 
    @types/react: 18.0.26 => 18.0.26 
    @types/react-dom: 18.0.10 => 18.0.10 
    @types/react-input-mask: ^3.0.2 => 3.0.2 
    @typescript-eslint/eslint-plugin: ^5.48.0 => 5.48.2 
    @typescript-eslint/parser: ^5.48.0 => 5.48.2 
    @uselessdev/datepicker: ^2.7.0 => 2.7.0 
    chakra-react-select: ^4.4.3 => 4.4.3 
    cypress: ^12.10.0 => 12.10.0 
    cypress-social-logins: ^1.14.0 => 1.14.0 
    date-fns: ^2.29.3 => 2.29.3 
    eslint: ^8.31.0 => 8.32.0 
    eslint-config-airbnb: ^19.0.4 => 19.0.4 
    eslint-config-airbnb-typescript: ^17.0.0 => 17.0.0 
    eslint-config-next: ^13.1.1 => 13.1.2 
    eslint-config-prettier: ^8.6.0 => 8.6.0 
    eslint-plugin-import: ^2.26.0 => 2.27.5 
    eslint-plugin-jsx-a11y: ^6.6.1 => 6.7.1 
    eslint-plugin-react: ^7.31.11 => 7.32.1 
    eslint-plugin-react-hooks: ^4.6.0 => 4.6.0 
    formik: ^2.2.9 => 2.2.9 
    framer-motion: ^6.5.1 => 6.5.1 
    jest: ^29.5.0 => 29.5.0 
    jest-environment-jsdom: ^29.4.3 => 29.4.3 
    lodash: ^4.17.21 => 4.17.21 
    next: 13.1.1 => 13.1.1 
    next-auth: ^4.18.7 => 4.18.8 
    node-fetch: ^3.3.0 => 3.3.0 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    react-hook-form: ^7.43.7 => 7.43.7 
    react-input-mask: ^2.0.4 => 2.0.4 
    sharp: ^0.31.3 => 0.31.3 
    swc-plugin-coverage-instrument: ^0.0.16 => 0.0.16 
    typescript: 4.9.4 => 4.9.4 
    yup: ^0.32.11 => 0.32.11 

.swcrc:

{
  "$schema": "https://json.schemastore.org/swcrc",
  "jsc": {
    "experimental": {
      "plugins": [["swc-plugin-coverage-instrument", {}]]
    }
  }
}
kwonoj commented 1 year ago

This plugin does not generate nyc_output/out.json.

IonelLupu commented 3 months ago

@kwonoj what is this plugin generating?