Fix a bad assumption in a test on Node 15+.
Review Request #13518 — Created Feb. 3, 2024 and submitted — Latest diff uploaded
The unit test for anonymous classes failed on Node 15+. The test checks
that the anonymous wrapped class doesn't have aname
attribute, since
it's anonymous. However, ES6 class spec says -- and Node 15+ mandates --
that these instead have aname
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.