Skip to content

Commit 0063965

Browse files
committed
refactor(tests): update Result tests for consistency and readability
- Standardize quotes to double quotes for imports and strings. - Improve formatting for better readability. - Ensure all test descriptions follow a consistent style. - Maintain functionality while enhancing clarity in test cases.
1 parent dbda528 commit 0063965

File tree

15 files changed

+2204
-1968
lines changed

15 files changed

+2204
-1968
lines changed

.github/workflows/ci_bun.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI Bun
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Test with Bun
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Bun
21+
uses: oven-sh/setup-bun@v2
22+
with:
23+
bun-version: latest
24+
25+
- name: Install dependencies
26+
run: bun install
27+
28+
- name: Run lint
29+
run: bun run lint
30+
31+
- name: Run tests and coverage
32+
run: bun run test

.github/workflows/ci_node.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI Node.js
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
type-check:
13+
name: Type check with Node.js ${{ matrix.node-version }}
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [18.x, 20.x, 22.x]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
29+
- name: Install TypeScript
30+
run: npm install -g typescript
31+
32+
- name: Type check
33+
run: tsc --noEmit

.github/workflows/test.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ on:
99
- main
1010

1111
jobs:
12-
test:
12+
test-bun:
13+
name: Test with Bun
1314
runs-on: ubuntu-latest
1415

1516
steps:
1617
- name: Checkout code
17-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1819

1920
- name: Set up Bun
20-
uses: oven-sh/setup-bun@v1
21+
uses: oven-sh/setup-bun@v2
2122
with:
2223
bun-version: latest
2324

@@ -29,3 +30,30 @@ jobs:
2930

3031
- name: Run tests and coverage
3132
run: bun run test
33+
34+
build-node:
35+
name: Build compatibility check with Node.js ${{ matrix.node-version }}
36+
runs-on: ubuntu-latest
37+
38+
strategy:
39+
matrix:
40+
node-version: [18.x, 20.x, 22.x]
41+
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
46+
- name: Set up Node.js ${{ matrix.node-version }}
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: ${{ matrix.node-version }}
50+
51+
- name: Install TypeScript
52+
run: npm install -g typescript
53+
54+
- name: Type check
55+
run: tsc --noEmit
56+
57+
- name: Check package imports
58+
run: |
59+
node -e "import('./dist/index.js').then(() => console.log('✓ ESM import works')).catch(e => { console.error(e); process.exit(1); })" || echo "Build artifacts not present, skipping runtime check"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,8 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
3131
# IntelliJ based IDEs
3232
.idea
3333

34+
# VSCode
35+
.vscode
36+
3437
# Finder (MacOS) folder config
3538
.DS_Store

0 commit comments

Comments
 (0)