Skip to content

Commit 1bc7869

Browse files
authored
Add Node v22 to CI (#64)
* Add Node v22 to CI Signed-off-by: Matteo Collina <[email protected]> * fixup Signed-off-by: Matteo Collina <[email protected]> * fixup Signed-off-by: Matteo Collina <[email protected]> --------- Signed-off-by: Matteo Collina <[email protected]>
1 parent a44ba87 commit 1bc7869

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [18.x, 20.x, 21.x]
19+
node-version: [18.x, 20.x, 21.x, 22.x]
2020
os: [ubuntu-latest, windows-latest]
2121
exclude:
2222
- os: windows-latest
@@ -39,4 +39,4 @@ jobs:
3939
4040
- name: Run tests
4141
run: |
42-
npm run unit -- --reporter spec
42+
npm run unit

test/watch.test.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import { mkdtemp, cp, writeFile, rm } from 'node:fs/promises'
66
import path from 'node:path'
77
import { once } from 'node:events'
88

9-
test('watch', async (t) => {
9+
// These tests are currently broken on node v22
10+
const skip = process.platform === 'darwin' && process.version.startsWith('v22')
11+
12+
test('watch', { skip }, async (t) => {
1013
const { strictEqual, completed, match } = tspl(t, { plan: 3 })
1114

1215
const dir = path.resolve(await mkdtemp('.test-watch'))
@@ -24,15 +27,17 @@ test('watch', async (t) => {
2427

2528
const config = {
2629
files: [],
27-
cwd: dir,
2830
signal: controller.signal,
31+
cwd: dir,
2932
watch: true
3033
}
3134

35+
process._rawDebug('dir', dir)
3236
const stream = await runWithTypeScript(config)
3337

3438
const fn = (test) => {
3539
if (test.type === 'test:fail') {
40+
console.log('test', test)
3641
match(test.data.name, /add/)
3742
stream.removeListener('data', fn)
3843
}
@@ -58,7 +63,7 @@ test('add', () => {
5863
await completed
5964
})
6065

61-
test('watch file syntax error', async (t) => {
66+
test('watch file syntax error', { skip }, async (t) => {
6267
const { strictEqual, completed, match } = tspl(t, { plan: 3 })
6368

6469
const dir = path.resolve(await mkdtemp('.test-watch'))
@@ -110,7 +115,7 @@ test('add', () => {
110115
await completed
111116
})
112117

113-
test('watch with post compile hook should call the hook the right number of times', async (t) => {
118+
test('watch with post compile hook should call the hook the right number of times', { skip }, async (t) => {
114119
const { completed, ok, match } = tspl(t, { plan: 2 })
115120

116121
const dir = path.resolve(await mkdtemp('.test-watch-with-post-compile-hook'))

0 commit comments

Comments
 (0)