hot-import icon indicating copy to clipboard operation
hot-import copied to clipboard

Unit tests failed under Mac OS with Node.js version: 10/11/12

Open huan opened this issue 5 years ago • 4 comments

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.

huan avatar Jun 13 '19 11:06 huan

seems like #16

hanguofeng avatar Jun 13 '19 17:06 hanguofeng

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)

hanguofeng avatar Jun 13 '19 19:06 hanguofeng

note v10.16.0 changelog from node shows

  • upgrade to libuv 1.28.0 (cjihrig) #27241

hanguofeng avatar Jun 13 '19 19:06 hanguofeng

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.

huan avatar Jun 14 '19 05:06 huan