Skip to content

Commit

Permalink
Merge pull request #73 from joshmu/feat_testing
Browse files Browse the repository at this point in the history
docs: contributing update
  • Loading branch information
joshmu authored Dec 27, 2024
2 parents 4dd182e + 68bc519 commit fe1cf54
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,34 @@ To get started with contributing, please follow these steps:
5. Commit your changes and push them to your forked repository.
6. Open a pull request to the main repository.

### Running Tests

The project uses Mocha for testing. To run the test suite:

1. Run all tests: `npm test`
2. Run specific test file: `npm test -- path/to/test`

When writing tests:

- Place test files in `src/test/suite/`
- Use the naming convention `*.test.ts`
- Group related tests using `suite()` and `test()`
- Keep tests focused and simple
- Mock external dependencies
- Use descriptive test names that explain the expected behavior

Example test structure:

```typescript
suite('Feature Name', () => {
test('should handle specific case', async () => {
// Arrange
// Act
// Assert
});
});
```

### Running the extension

Open the extension project in VS Code (e.g. by running `code .` in the project folder).
Expand Down

0 comments on commit fe1cf54

Please sign in to comment.