Fix a ReferenceError caused by a typo (`_construct` instead of `construct`) in the external `wrapNativeSuper` helper. (The typo doesn't usually cause an error in inline helpers because `_construct` happens to be the default name given to the `construct` helper function.)
16 lines
255 B
JavaScript
16 lines
255 B
JavaScript
var called = false;
|
|
|
|
var env = {
|
|
Array: function Array() {
|
|
called = true;
|
|
}
|
|
};
|
|
|
|
// We need to use "with" to avoid leaking the modified Array to other tests.
|
|
with (env) {
|
|
class List extends Array {};
|
|
new List();
|
|
|
|
expect(called).toBe(true);
|
|
}
|