Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: simplify test-async-hooks-http-parser-destroy #26963

Closed
wants to merge 1 commit into from

Commits on Apr 19, 2019

  1. test: simplify test-async-hooks-http-parser-destroy

    Simplify test-async-hooks-http-parser-destroy and improve it's reporting
    when failing. (Also makes it easier to run on older versions of Node.js
    because it doesn't rely on internal test modules that won't work there.)
    
    Before, failures looked like this (edited slightly to conform to our
    commit message 72-char line length restriction):
    
        The expression evaluated to a falsy value:
        assert.ok(destroyedIds.indexOf(createdAsyncId) >= 0)
    
    Now, you get a slightly better idea of what's up. (Is it missing one ID?
    More than one? All of them?):
    
        Input A expected to strictly deep-equal input B:
        + expected - actual ... Lines skipped
    
          Set {
            1009,
        ...
            1025,
        -   158,
        -   159,
        -   161,
        -   162,
        -   164,
        -   165,
        -   167,
        -   168,
        -   170,
        ...
        +   159,
        +   162,
        +   165,
        +   168,
        +   171,
        +   174,
        +   177,
        +   180,
        +   183,
    
    This test still fails as expected on 10.14.1 and passees on 10.14.2
    (where the regression it tests for was fixed). (You will need to comment
    on the `require('../common');` line first but that's now the only change
    you need to make this run in older versions.)
    
    Refs: nodejs#26610
    Trott committed Apr 19, 2019
    Configuration menu
    Copy the full SHA
    079d054 View commit details
    Browse the repository at this point in the history