Skip to content

Commit 7384185

Browse files
authored
test: add ts smoke tests (google#801)
* test: add ts smoke tests * test: fix ts smoke test * fix(types): add @webpod/ingrid to dts bundle * ci: print TS version
1 parent 0eb81c9 commit 7384185

File tree

8 files changed

+683
-72
lines changed

8 files changed

+683
-72
lines changed

.github/workflows/test.yml

+33-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
FORCE_COLOR: 3
2929
strategy:
3030
matrix:
31-
node-version: [16.x, 18.x, 20.x]
31+
node-version: [16.x, 20.x, 22.x]
3232
steps:
3333
- uses: actions/checkout@v4
3434
- name: Use Node.js ${{ matrix.node-version }}
@@ -74,7 +74,9 @@ jobs:
7474
- uses: actions/download-artifact@v4
7575
with:
7676
name: build
77-
- run: bun test ./test/smoke/bun.test.js
77+
- run: |
78+
bun test ./test/smoke/bun.test.js
79+
bun ./test/smoke/ts.test.ts
7880
timeout-minutes: 1
7981
env:
8082
FORCE_COLOR: 3
@@ -91,7 +93,7 @@ jobs:
9193
- uses: actions/download-artifact@v4
9294
with:
9395
name: build
94-
- run: deno test ./test/smoke/deno.test.js --allow-read --allow-sys --allow-env --allow-run
96+
- run: deno test --allow-read --allow-sys --allow-env --allow-run ./test/smoke/deno.test.js
9597
timeout-minutes: 1
9698
env:
9799
FORCE_COLOR: 3
@@ -116,3 +118,31 @@ jobs:
116118
- name: mjs smoke test
117119
if: matrix.node-version != '12'
118120
run: npm run test:smoke:mjs
121+
122+
smoke-ts:
123+
runs-on: ubuntu-latest
124+
needs: build
125+
strategy:
126+
matrix:
127+
ts: [4, 5]
128+
steps:
129+
- uses: actions/checkout@v4
130+
- name: Use Node.js 20.x
131+
uses: actions/setup-node@v4
132+
with:
133+
node-version: 20.x
134+
- name: Install deps
135+
run: npm ci
136+
- name: Install TypeScript ${{ matrix.ts }}
137+
run: |
138+
npm i typescript@${{ matrix.ts }}
139+
tsc -v
140+
- uses: actions/download-artifact@v4
141+
with:
142+
name: build
143+
- name: tsc
144+
run: npm run test:smoke:tsc
145+
- name: tsx
146+
run: npm run test:smoke:tsx
147+
- name: ts-node
148+
run: npm run test:smoke:ts-node

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ coverage/
44
package/
55
reports/
66
yarn.lock
7-
test/fixtures/ts-project/package-lock.json
8-
test/fixtures/js-project/package-lock.json
7+
temp

0 commit comments

Comments
 (0)