Skip to content

Commit da779b2

Browse files
authored
Add vitest (#123)
Add vitest example test and add GitHub action to run it. Relatedly, add `.prettierrc` and a GitHub Action to check TypeScript types.
1 parent 1fecf05 commit da779b2

File tree

10 files changed

+4099
-11530
lines changed

10 files changed

+4099
-11530
lines changed

.github/workflows/check-format.yml

-16
This file was deleted.

.github/workflows/lint.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# setup
13+
- uses: actions/checkout@v4
14+
- uses: oven-sh/setup-bun@v2
15+
16+
- name: Install package dependencies
17+
run: bun install
18+
19+
# goal
20+
- name: Check TypeScript types
21+
run: bun run check
22+
23+
- name: Check code formatting
24+
run: bun run format

.github/workflows/test.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# setup
13+
- uses: actions/checkout@v4
14+
- uses: oven-sh/setup-bun@v2
15+
16+
- name: Install package dependencies
17+
run: bun install
18+
19+
# goal
20+
- name: Run tests
21+
run: bun run test

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode"
3+
}

0 commit comments

Comments
 (0)