Skip to content

Commit 2ee58bc

Browse files
committed
Fix CI
1 parent 60e23be commit 2ee58bc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13+
- 24
1314
- 20
14-
- 18
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4

test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from 'node:path';
33
import fs from 'node:fs/promises';
44
import fsSync from 'node:fs';
55
import {fileURLToPath} from 'node:url';
6+
import {setTimeout} from 'node:timers/promises';
67
import touch from 'touch';
78
import test from 'ava';
89
import gulp from 'gulp';
@@ -167,6 +168,9 @@ test.serial(`compareLastModifiedTime ${pointer} detects file replacement with ol
167168
stream1.on('end', resolve);
168169
});
169170

171+
// Add a small delay to ensure dest file's mtime is properly set
172+
await setTimeout(10);
173+
170174
// Replace source with older file
171175
await fs.writeFile(srcPath, 'console.log("old");');
172176
const oldTime = Date.now() - 10_000;

0 commit comments

Comments
 (0)