Skip to content

Commit

Permalink
chore: switch from Jest to Vitest / bump to prettier 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kevcodez authored Feb 5, 2024
1 parent f43f743 commit 8807e8b
Show file tree
Hide file tree
Showing 37 changed files with 4,000 additions and 8,252 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
- master
workflow_dispatch:

# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test
Expand All @@ -29,7 +34,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actionsx/prettier@v2
- uses: actionsx/prettier@v3
with:
args: --check "{src,test}/**/*.ts"

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
- master
workflow_dispatch:


# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
docs:
name: Publish docs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ None. Please don't use this as a standalone server. This should be used behind a

To start developing, run `npm run dev`. It will set up the database with Docker for you. The server will restart on file change.

If you are fixing a bug, you should create a new test case. To test your changes, add the `-u/--updateSnapshot` flag to `jest` on the `test:run` script, run `npm run test`, and then review the git diff of the snapshots. Depending on your change, you may see `id` fields being changed - this is expected and you are free to commit it, as long as it passes the CI. Don't forget to remove the `-u/--updateSnapshot` flag when committing.
If you are fixing a bug, you should create a new test case. To test your changes, add the `-u` flag to `vitest` on the `test:run` script, run `npm run test`, and then review the git diff of the snapshots. Depending on your change, you may see `id` fields being changed - this is expected and you are free to commit it, as long as it passes the CI. Don't forget to remove the `-u` flag when committing.

To make changes to the TypeScript type generation, run `npm run gen:types:typescript` while you have `npm run dev` running.
To use your own database connection string instead of the provided test database, run:
Expand Down
Loading

0 comments on commit 8807e8b

Please sign in to comment.