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

Bug: fs error in between builds #140

Open
kieran-osgood opened this issue Jan 8, 2024 · 1 comment
Open

Bug: fs error in between builds #140

kieran-osgood opened this issue Jan 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@kieran-osgood
Copy link

Describe the bug
In between runs of the CLI, there is a fs error from attempting to open coverage-ts/typescript-coverage.json - seems in clearing the dir for the new report, it also attempts to open it.

[Error: ENOENT: no such file or directory, open 'coverage-ts/typescript-coverage.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'coverage-ts/typescript-coverage.json'
}

To Reproduce
Run the CLI from a clean install, below is my config:

  "typeCoverage": {
    "atLeast": 99,
    "cache": true,
    "debug": false,
    "detail": true,
    "ignoreCatch": false,
    "ignoreFiles": [
      "babel.config.js",
      "ios/**/*",
      "tmp/**/*",
      "machines/**/*",
      "apps/xstate/machines/**/*"
    ],
    "project": "tsconfig.json",
    "strict": true,
    "suppressError": false,
    "update": false,
    "updateIfHigher": true,
    "ignoreUnread": true,
    "ignoreNested": true,
    "ignoreAsAssertion": false,
    "ignoreTypeAssertion": false,
    "ignoreNonNullAssertion": false,
    "ignoreObject": false,
    "ignoreEmptyType": false,
    "showRelativePath": true,
    "noDetailWhenFailed": false,
    "reportSemanticError": true,
    "notOnlyInCWD": false,
    "jsonOutput": false
  }

Observe that coverage-ts/typescript-coverage.json is produced, re-run the CLI and it is deleted but the CLI exits with error code 255

Expected behaviour
Exits with error code 0
Assets to be produced

Screenshots
CLI output from 3 consecutive runs with no other changes:
image

FS after a SUCCESSFUL run:
image

FS after a FAILED run Note: assets aren't generated nor the json coverage
image

Environment

  • Tool version: typescript-coverage-report: 8.0.0
  • OS: MacOS Sonoma 14.2.1
  • Node version: 19.7.0
@kieran-osgood kieran-osgood added the help wanted Extra attention is needed label Jan 8, 2024
@kieran-osgood
Copy link
Author

kieran-osgood commented Jan 8, 2024

Noticed that the issue seems to have arisen from mistakenly including " coverage-ts/assets/source-file.js" in the report, after adding that to the ignoreFiles I can consistently run the reports, not sure why this would present the error that occurs though

@alexcanessa alexcanessa self-assigned this Mar 7, 2024
@alexcanessa alexcanessa changed the title Bug: Bug: fs error in between builds Mar 7, 2024
@alexcanessa alexcanessa added bug Something isn't working and removed help wanted Extra attention is needed labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants