question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
JPeer264commented, May 7, 2020

Tested fs-extra@9 against all supported Node versions on latest MacOS 10.15.4. Everything is now working as expected

0reactions
manidloucommented, May 7, 2020

@RyanZim @JPeer264 Is this still valid?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Check if a Mac disk is about to fail - Apple Support
Check if a Mac disk is about to fail. You can check the health of many disks using Disk Utility. Many disks include...
Read more >
Xcode tests are failing on mac runners due to lack of ... - GitHub
Hi, we are having a problem with failed async tests on GH macOS runners that executes the iOS framework tests. In some cases,...
Read more >
How to Identify Mac Issues With Apple's Hardware Diagnostics ...
If your Mac isn't working right, you can try Apple's built-in diagnostic tests to find out what's wrong with your battery, processor, ...
Read more >
Using the Apple Hardware Test to Diagnose Problems - Lifewire
Use the Apple Hardware Test Over the Internet · Make sure your Mac is turned off. · If you're testing a Mac portable,...
Read more >
I have MAC M1 pro chipset and when Im running test in ...
1 Answer 1 · Now I m getting this error and i have enablejetifier = true Failed to transform '/Users/name/.gradle/caches/modules-2/files-2.1/org.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found