File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -160,13 +160,15 @@ function runTests(iter) {
160
160
const path = `${ tmpdir . path } /test-utimes-precision` ;
161
161
fs . writeFileSync ( path , '' ) ;
162
162
163
- // Test Y2K38 for all platforms [except 'arm', 'OpenBSD', 'SunOS' and 'IBMi']
164
- if ( ! process . arch . includes ( 'arm' ) &&
165
- ! common . isOpenBSD && ! common . isSunOS && ! common . isIBMi ) {
163
+ {
166
164
const Y2K38_mtime = 2 ** 31 ;
167
165
fs . utimesSync ( path , Y2K38_mtime , Y2K38_mtime ) ;
168
166
const Y2K38_stats = fs . statSync ( path ) ;
169
- assert . strictEqual ( Y2K38_stats . mtime . getTime ( ) / 1000 , Y2K38_mtime ) ;
167
+ const mtimeStamp = Y2K38_stats . mtime . getTime ( ) / 1000 ;
168
+ // Off-by-one value is permissible for file systems that don't support Y2K38.
169
+ if ( mtimeStamp !== Y2K38_mtime && mtimeStamp !== Y2K38_mtime - 1 ) {
170
+ assert . fail ( `${ mtimeStamp } unexpected` ) ;
171
+ }
170
172
}
171
173
172
174
if ( common . isWindows ) {
You can’t perform that action at this time.
0 commit comments