microsoft / microsoft/vscode-react-native
[Documentation] Update CONTRIBUTING.md with current test execution instructions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 295
- Avg merge
- 11h 17m
- Merged PRs (30d)
- 24
Description
Summary
The CONTRIBUTING.md file contains outdated test execution instructions that don't fully match current project setup.
Current Issues
-
Test command inconsistency:
- CONTRIBUTING.md mentions
npm testandnpm run test-localization package.jsonshows these scripts exist but additional test commands are available- No mention of
test:coveragecommand that exists in gulpfile.js
- CONTRIBUTING.md mentions
-
Smoke test documentation:
- Says to run
yarn smoke-testsbut package.json uses npm, not yarn - References
Launch All Smoke Testscommand but no details about setup requirements - Links to
test/smoke/docs/run-locally.mdfor setup but doesn't explain prerequisites
- Says to run
-
Missing test information:
- No mention of
test-no-buildoption - No explanation of watch mode (
watch-build-test) - No coverage of
gulp testvsnpm testdifferences
- No mention of
Current Documentation
## Testing
There is a set of Mocha tests for the extension and extension localization which can be run with `npm test` and `npm run test-localization` or by `Launch Extension Tests` and `Launch Localization Tests`. Also there are e2e smoke tests placed in [`test/smoke`](https://github.com/microsoft/vscode-react-native/tree/master/test/smoke) folder that can be launched by `yarn smoke-tests` command or by `Launch All Smoke Tests` command. Make sure to [prepare test environment](https://github.com/microsoft/vscode-react-native/blob/master/test/smoke/docs/run-locally.md) before launching e2e tests.
Proposed Changes
Update CONTRIBUTING.md to include:
-
Test Types:
- Unit tests: What they cover, how to run
- Smoke tests: What they cover, prerequisites
- Localization tests: Purpose and execution
-
Test Commands:
# Run unit tests npm test # Run tests with coverage report gulp test:coverage # Run tests without rebuild gulp test-no-build # Watch mode for development gulp watch-build-test # Run localization tests npm run test-localization # Run smoke tests (requires environment setup) npm run smoke-tests -
VS Code Launch Configurations:
- List available launch configs
- Explain when to use each one
-
Smoke Test Setup:
- Summarize key prerequisites
- Link to detailed setup guide
- Mention platform-specific requirements
-
Test Coverage:
- How to view coverage reports
- Where coverage files are generated
- Target coverage goals (if any)
Example Section
## Testing
The project has three types of automated tests:
### Unit Tests
Unit tests cover extension functionality, commands, debugger logic, and utilities.
**Run all unit tests:**
```bash
npm test
Run with coverage report:
gulp test:coverage
Skip rebuild (when code hasn't changed):
gulp test-no-build
VS Code launch config: Use Launch Extension Tests from the Debug panel.
Smoke Tests (E2E)
... [continue with smoke test details]
Localization Tests
... [continue with localization test details]
## Benefits
- Accurate documentation for contributors
- Clearer test execution workflow
- Better onboarding for new contributors
- Reduced confusion about test commands
- Alignment with actual project configuration
## References
- CONTRIBUTING.md line 30-31
- package.json test scripts
- gulpfile.js test tasks
- .vscode/launch.json configurations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CONTRIBUTING.md and compare its Testing section against the test scripts in package.json, tasks in gulpfile.js, .vscode/launch.json, and test/smoke/docs/run-locally.md. Update the documentation to cover the requested test types, commands, launch configurations, prerequisites, and coverage details, with all commands matching the current project configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- developer-experience, documentation, testing
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100