• 
      

    Fix a bad assumption in a test on Node 15+.

    Review Request #13518 — Created Feb. 3, 2024 and submitted

    Information

    Spina
    master

    Reviewers

    The unit test for anonymous classes failed on Node 15+. The test checks
    that the anonymous wrapped class doesn't have a name attribute, since
    it's anonymous. However, ES6 class spec says -- and Node 15+ mandates --
    that these instead have a name of an empty string. This breaks our
    assumption.

    The assertion has been updated to check for either an empty name or a
    missing attribute, covering all versions.

    Unit tests pass on Node 14 through 21.

    Summary ID
    Fix a bad assumption in a test on Node 15+.
    The unit test for anonymous classes failed on Node 15+. The test checks that the anonymous wrapped class doesn't have a `name` attribute, since it's anonymous. However, ES6 class spec says -- and Node 15+ mandates -- that these instead have a `name` of an empty string. This breaks our assumption. The assertion has been updated to check for either an empty name or a missing attribute, covering all versions.
    095f556b8848f00c2f8006103b5ec137fc848b79
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (12dce32)