Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/samuelgja/better-tests


https://github.com/samuelgja/better-tests

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Better tests for Visual Studio Code
Small extension to provide better user experience for testing your `typescript` / `javascript` code!

![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/samuelgja.better-tests-experience)

Extension provide better experience to run tests in your typescript / javascript projects directly via opened file or via vscode command.

*Working also in monorepos, looking for the current `package.json` and running tests in the right context.*

**Example of usage**:

![alt text](https://github.com/samuelgja/better-tests/blob/main/assets/example.png?raw=true )

## Configuration

### `.vscode/settings.json`

You can use the following configurations to customize the behavior of the Better Tests extension.

```jsonc
{
"better.test.filePattern": {
"type": "string",
"default": "**/*.{test,spec}.{js,ts,tsx,jsx}",
"description": "Glob pattern to match test files (e.g., **/*.test.{js,ts,tsx,jsx})"
},
"better.test.customFlag": {
"type": "string",
"default": "",
"description": "Custom flag added to the end of test command"
},
"better.test.customScript": {
"type": "string",
"default": "bun test",
"description": "Custom script to use instead of `bun test`, for example script from `package.json`"
},
"better.test.watchFlag": {
"type": "string",
"default": "--watch",
"description": "Custom flag for the watch mode. Default is --watch"
}
}
```