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

coverage data in dist folder files of npm package interfering with jest coverage #63

Closed
paradite opened this issue Feb 4, 2022 · 4 comments
Assignees

Comments

@paradite
Copy link

paradite commented Feb 4, 2022

Describe the bug
Coverage data are found in various files in dist folder of the npm package, causing increased file size and more importantly interfering with jest coverage data (running jest with coverage reports extra info from this pacakge).

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://unpkg.com/react-sketch-canvas@6.1.0/dist/react-sketch-canvas.cjs.development.js and check the file content
  2. Go to https://unpkg.com/react-sketch-canvas@6.1.0/dist/react-sketch-canvas.esm.js and check the file content
  3. Go to https://unpkg.com/react-sketch-canvas@6.1.0/dist/react-sketch-canvas.cjs.production.min.js and check the file content

Observe the following:

function cov_20wqqco38b() {
  var path = "/home/vinoth/projects/react-sketch-canvas/src/Paths/index.tsx";
  var hash = "80c4a162af9ff11419db7b7c460ec352bdae34fe";
  var global = new Function("return this")();
  var gcv = "__coverage__";
  var coverageData = {
    path: "/home/vinoth/projects/react-sketch-canvas/src/Paths/index.tsx",
    statementMap: {
      "0": {
        start: {
          line: 5,
          column: 23
        },
        end: {
          line: 13,
          column: 1
        }
      },
      "1": {
        start: {
          line: 6,
          column: 4
        },
        end: {
          line: 10,
          column: 5
        }
      },
      "2": {
        start: {
          line: 7,
          column: 25
        },
        end: {
          line: 7,
          column: 33
...

Expected behavior
no coverage data inside

Screenshots
file content:
Screenshot 2022-02-04 at 10 08 28 PM

production min file:
Screenshot 2022-02-04 at 10 16 06 PM

interference with jest:
Screenshot 2022-02-04 at 10 11 13 PM

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

@vinothpandian vinothpandian self-assigned this Mar 12, 2022
vinothpandian added a commit that referenced this issue Mar 13, 2022
vinothpandian added a commit that referenced this issue Mar 13, 2022
vinothpandian added a commit that referenced this issue Mar 13, 2022
vinothpandian added a commit that referenced this issue Mar 13, 2022
@vinothpandian
Copy link
Owner

Fixed in 6.1.5

@RosenTomov
Copy link

Looks like this issue was reintroduced in the pre-release version 7.0.0-next.2

@vinothpandian
Copy link
Owner

Thanks for notifying me. I'll create an issue

@vinothpandian vinothpandian reopened this Mar 15, 2023
@vinothpandian
Copy link
Owner

Fixed it in 7.0.0-next.3

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

3 participants