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

[Docs]: Better explain to contributors how they can execute a test suite #15355

Closed
ericmorand opened this issue Oct 23, 2024 · 4 comments
Closed

Comments

@ericmorand
Copy link

ericmorand commented Oct 23, 2024

Page(s)

CONTRIBUTING.md

Description

I am currently in the process of trying to add One Double Zero - that restores istanbul accuracy and correctness while using V8 coverage data - as an additional coverage provider for Jest, and for that I've been reading the CONTRIBUTING.md document, at least to understand how I can add some tests for the new provider.

This document says:

It is possible to run the integration test itself manually to inspect that the new behaviour is indeed correct. Here is a small code snippet of how to do just that. This is useful when debugging a failing test.

$ cd e2e/clear-cache
$ node ../../packages/jest-cli/bin/jest.js # It is possible to use `node --inspect`
PASS  __tests__/clear_cache.test.js
✓ stub (3ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        0.232 s, estimated 1 s
Ran all test suites.

Unfortunately, doing what the document explains within the e2e/coverage-provider-v8 directory doesn't work - no test is executed.

Moving deeper, into e2e/coverage-provider-v8/cjs-native-without-sourcemap, the command executes a dummy test that actually checks nothing.

And the following fails:

~/Projects/jest/e2e/__tests__$ node ../../packages/jest-cli/bin/jest.js coverageProviderV8.test.ts

SyntaxError: Cannot use import statement outside a module

It seems like the documentation is either wrong or incomplete.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Nov 22, 2024
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

1 similar comment
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant