mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 08:24:23 +02:00
Remove usage of Object.hasOwn in helper files
Instead use the easily available old-fashioned way, calling the method on Object.prototype.
This commit is contained in:
parent
49a4e1e7c8
commit
37ebe00a15
@ -15,7 +15,7 @@ defines: [asyncTest, assert.throwsAsync]
|
||||
* @returns {void}
|
||||
*/
|
||||
function asyncTest(testFunc) {
|
||||
if (!Object.hasOwn(globalThis, "$DONE")) {
|
||||
if (!Object.prototype.hasOwnProperty.call(globalThis, "$DONE")) {
|
||||
throw new Test262Error("asyncTest called without async flag");
|
||||
}
|
||||
if (typeof testFunc !== "function") {
|
||||
|
@ -133,7 +133,7 @@ var TemporalHelpers = {
|
||||
assert.sameValue(eraName, undefined);
|
||||
return undefined;
|
||||
}
|
||||
assert(Object.hasOwn(TemporalHelpers.CalendarEras, calendarId));
|
||||
assert(Object.prototype.hasOwnProperty.call(TemporalHelpers.CalendarEras, calendarId));
|
||||
|
||||
if (eraName === undefined) {
|
||||
return undefined;
|
||||
|
Loading…
x
Reference in New Issue
Block a user