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

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

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.

Commits

Files