AndreasMadsen / async-hook

Inspect the life of handle objects in node
MIT License
36 stars 14 forks source link

Fixtest #9

Closed RobinQu closed 8 years ago

RobinQu commented 8 years ago

fix previous tests.

AndreasMadsen commented 8 years ago

What node version are you running?

RobinQu commented 8 years ago

Tests failed in node 4.5.0, but did pass in node 6.5.0

$ node -v
v4.5.0

$ npm test

> async-hook@1.6.0 test /Users/robinqu/Desktop/Repos/async-hook
> node ./test/runner.js && eslint .

 - running test-conflict-match.js ... ok
 - running test-conflict-mismatch.js ... ok
 - running test-fsaccess-disabled.js ... ok
 - running test-fsaccess-enabled.js ... ok
 - running test-hooks-remove.js ... ok
 - running test-hooks-twice.js ... ok
 - running test-immediate-clear.js ... ok
 - running test-immediate-didthrow.js ... ok
 - running test-immediate-disabled.js ... ok
 - running test-immediate-enabled.js ... ok
 - running test-immediate-non-function.js ... ok
 - running test-interval-clear.js ... ok
 - running test-interval-didthrow.js ... ok
 - running test-interval-disabled.js ... ok
 - running test-interval-enabled.js ... ok
 - running test-interval-non-function.js ... ok
 - running test-nexttick-didthrow.js ... ok
 - running test-nexttick-disabled.js ... ok
 - running test-nexttick-enabled.js ... ok
 - running test-nexttick-non-function.js ... ok
 - running test-parent.js ... ok
 - running test-promise-catch-enabled.js ... ok
 - running test-promise-catch-then-chain-fulfilled-enabled.js ... ok
 - running test-promise-disabled.js ... ok
 - running test-promise-then-catch-chain-rejected-enabled.js ... ok
 - running test-promise-then-fulfilled-chained-enabled.js ... ok
 - running test-promise-then-fulfilled-enabled.js ... ok
 - running test-promise-then-fulfilled-multiple-enabled.js ... ok
 - running test-promise-then-rejected-enabled.js ... ok
 - running test-promise-timing.js ...
assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: [ 'init#-1 TimeoutWrap',
  'init#-2 PromiseWrap',
  'init#-3 PromiseWrap',
  'pre#-1',
  'post#-1',
  'destroy#-1',
  'pre#-2',
 deepEqual [ 'init#-1 TimeoutWrap',
  'init#-2 PromiseWrap',
  'init#-3 PromiseWrap',
  'pre#-1',
  'post#-1',
  'destroy#-1',
  'pre#-2',

    at process.g (events.js:260:16)
    at emitOne (events.js:77:13)
    at process.emit (events.js:169:7)
 - failed
 - running test-stackfilter-eval.js ... ok
 - running test-timeout-clear.js ... ok
 - running test-timeout-didthrow.js ... ok
 - running test-timeout-disabled.js ... ok
 - running test-timeout-enabled.js ... ok
 - running test-timeout-non-function.js ... ok
failed - 1 tests failed
$ nvm use 6
Now using node v6.5.0 (npm v3.10.3)
10:async-hook robinqu$ npm test

> async-hook@1.6.0 test /Users/robinqu/Desktop/Repos/async-hook
> node ./test/runner.js && eslint .

 - running test-conflict-match.js ... ok
 - running test-conflict-mismatch.js ... ok
 - running test-fsaccess-disabled.js ... ok
 - running test-fsaccess-enabled.js ... ok
 - running test-hooks-remove.js ... ok
 - running test-hooks-twice.js ... ok
 - running test-immediate-clear.js ... ok
 - running test-immediate-didthrow.js ... ok
 - running test-immediate-disabled.js ... ok
 - running test-immediate-enabled.js ... ok
 - running test-immediate-non-function.js ... ok
 - running test-interval-clear.js ... ok
 - running test-interval-didthrow.js ... ok
 - running test-interval-disabled.js ... ok
 - running test-interval-enabled.js ... ok
 - running test-interval-non-function.js ... ok
 - running test-nexttick-didthrow.js ... ok
 - running test-nexttick-disabled.js ... ok
 - running test-nexttick-enabled.js ... ok
 - running test-nexttick-non-function.js ... ok
 - running test-parent.js ... ok
 - running test-promise-catch-enabled.js ... ok
 - running test-promise-catch-then-chain-fulfilled-enabled.js ... ok
 - running test-promise-disabled.js ... ok
 - running test-promise-then-catch-chain-rejected-enabled.js ... ok
 - running test-promise-then-fulfilled-chained-enabled.js ... ok
 - running test-promise-then-fulfilled-enabled.js ... ok
 - running test-promise-then-fulfilled-multiple-enabled.js ... ok
 - running test-promise-then-rejected-enabled.js ... ok
 - running test-promise-timing.js ... ok
 - running test-stackfilter-eval.js ... ok
 - running test-timeout-clear.js ... ok
 - running test-timeout-didthrow.js ... ok
 - running test-timeout-disabled.js ... ok
 - running test-timeout-enabled.js ... ok
 - running test-timeout-non-function.js ... ok
passed - 36 tests passed
AndreasMadsen commented 8 years ago

Exactly, I think there was a bug in v8 related to the timing, but it was fixed with the upgrade in node v6

AndreasMadsen commented 8 years ago

Fixed in c4525789d04a26683bf2d54e44a33bdc5f730dee