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

vitest breaks due to Scarf analytics reporting #10197

Closed
SheldonWBM opened this issue Nov 5, 2024 · 4 comments
Closed

vitest breaks due to Scarf analytics reporting #10197

SheldonWBM opened this issue Nov 5, 2024 · 4 comments
Assignees
Labels
dependencies Pull requests that update a dependency file type: integration bug version: 5.x

Comments

@SheldonWBM
Copy link

Cause:
This is likely due to PR #10194

Issue:
When I run Vitest, using yarn, I have the following error

❯ .yarn/unplugged/@scarf-scarf-npm-1.3.0-df555ef968/node_modules/@scarf/scarf/test/report.test.js (7)
   ❯ Reporting tests (7)
     ⠙ [ beforeAll ]
     ↓ Logging rate limit check [skipped]
     ↓ Redact sensitive data [skipped]
     ↓ Intermediate packages can disable Scarf for their dependents [skipped]
     ↓ Disable when package manager is yarn [skipped]
     ↓ Configurable for top level installs, and enabled for global installs [skipped]
     ↓ Can parse example git rev-parse HEAD output [skipped]
     ↓ getGitShaFromRootPath resolves in test run of cloned repository [skipped]
.yarn/unplugged/@scarf-scarf-npm-1.3.0-df555ef968/node_modules/@scarf/scarf/test/report.test.js > Reporting tests
ReferenceError: jest is not defined

Workaround:
In project's package.json, I tried

  "scarfSettings": {
    "defaultOptIn": false
  },

I also tried

  "scarfSettings": {
    "enabled": false
  },

Solutions

  • Fix it so it doesn't error when running a vitest.
  • Collecting statistics should be an opt-in, not an opt-out
@char0n
Copy link
Member

char0n commented Nov 7, 2024

Hi @SheldonWBM,

Thanks for the report. The issue is being addressed in #10204

@char0n
Copy link
Member

char0n commented Nov 7, 2024

@char0n char0n closed this as completed Nov 7, 2024
@char0n
Copy link
Member

char0n commented Nov 7, 2024

@SheldonWBM can you please confirm that https://github.com/swagger-api/swagger-ui/releases/tag/v5.18.2 no longer breaks Vitest?

@char0n char0n reopened this Nov 7, 2024
@SheldonWBM
Copy link
Author

Confirmed. Thank you for quickly resolving the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file type: integration bug version: 5.x
Projects
None yet
Development

No branches or pull requests

2 participants