hot-import
hot-import copied to clipboard
Unit tests failed under Mac OS with Node.js version: 10/11/12
not ok 37 should monitored file change event at least once
---
operator: ok
expected: true
actual: false
at: Object.<anonymous> (/Users/travis/build/huan/hot-import/tests/fs-watch.spec.ts:221:5)
stack: |-
Error: should monitored file change event at least once
and more.
See: https://travis-ci.com/huan/hot-import/builds/115406390
@hanguofeng Please be aware that if you are using Mac OS. Linux will not be affected.
I'll make it publish first, then look in to it later.
seems like #16
seems like #16
not like. reprduced on macos without docker but with nvm
node version v10.15.3 (npm v6.4.1) build pass node version v10.16.0 (npm v6.9.0) build fail
test result are not stable , fail case count randomly from 3 to 5 and these following cases are fail:
not ok 9 should import module class with right id:2
operator: equal expected: 2 actual: 1 at: Object.
(/Users/hanguofeng/Code/hot-import/src/hot-import.spec.ts:92:9)
not ok 12 should get expected values from variable in module
operator: equal expected: 'changed' actual: 'original' at: Object.
(/Users/hanguofeng/Code/hot-import/src/hot-import.spec.ts:117:9)
not ok 30 should monitored file change event at least once
operator: ok expected: true actual: false at: Object.
(/Users/hanguofeng/Code/hot-import/tests/fs-watch.spec.ts:91:5)
not ok 33 should monitored 1 change event
operator: equal expected: 1 actual: 0 at: Object.
(/Users/hanguofeng/Code/hot-import/tests/fs-watch.spec.ts:158:5)
not ok 37 should monitored file change event at least once
operator: ok expected: true actual: false at: Object.
(/Users/hanguofeng/Code/hot-import/tests/fs-watch.spec.ts:221:5)
So according to your result, it seems that this issue related to the libuv 1.28.0 update?
I like to use setImmediate
a lot because I believe the modification event should already be queued in the event loop, so the setImmediate
will run after the event fired.
However, this is just my guess and it works without any problem under Linux, but the MacOS seems a different story now.