Tests are failing on mac
See original GitHub issue- Operating System: macOS 10.13.3
- Node.js version: v6.14.1 - 1 test is failing v8.11.1 - 3 tests are failing
fs-extra
version:v6-dev
- branch
I don’t know why they pass on travis though
1 test is the same failing on v6 and v8: utimes.test.js:31:7
. It asserts false
but get true
. The reason might be, that my flash storage is on APFS
and not on HFS
. I have no clue how to fix this.
The other two in v8 are actually just timestamp checks, which are different for ~4ms:
copy-sync-preserve-time.test.js:48:11
copy-preserve-time.test.js:51:11
I don’t know if that is valid for you, but the assert can be changed to following:
assert.strictEqual(utimes.timeRemoveMillis(toStat.mtime.getTime()), utimes.timeRemoveMillis(fromStat.mtime.getTime()))
The above solution can be a bit flaky as well, if the second timestamp is in another second than the other (according to the timeRemoveMillis
method). E.g. toStat is 1524121168999
and fromStat is 1524121169001
then it fail although there are just 2ms in between.
Or we can check if those two timestamps are in between a threshold of, lets say, 5ms.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (4 by maintainers)
Tested fs-extra@9 against all supported Node versions on latest MacOS 10.15.4. Everything is now working as expected
@RyanZim @JPeer264 Is this still valid?