Skip to content

Commit

Permalink
Updates vitest config to deal with flaky tests (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
pastuxso authored Feb 12, 2024
1 parent c9c1d1a commit eedd856
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
name: Test Changes

on: [push, pull_request]
on:
pull_request:
push:
branches:
- main

# cancel old edit events being processed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Node version
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ npx eslint src tests
unit tests via [Vitest](https://vitest.dev/):

```sh {"id":"01HF7GMQ6NTPMHCVN4BY0W782F","name":"test:unit"}
npx vitest --config ./vitest.config.ts
npx vitest --config ./vitest.config.ts --retry=3
```

Update snapshots used in tests if necesary:

```sh {"name":"test:unit:snapshots"}
```sh {"id":"01HPEYC6NE0WP6X2KTGQAHZVSN","name":"test:unit:snapshots"}
npx vitest --config ./vitest.config.ts -u
```

Expand Down

0 comments on commit eedd856

Please sign in to comment.