Skip to content

Commit

Permalink
chore(test): fix bootstrap to follow ES semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
Desplandis committed Feb 5, 2024
1 parent 47d0c7c commit 4d4e28f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/unit/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ global.URL = function URL(url) {
};
};

global.Event = () => {};
// https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-instanceofoperator
// ES standard requires that left-hand side shall have a prototype method, this
// is not the case for lambdas.
global.Event = function () {};
global.requestAnimationFrame = () => {};
global.fetch = fetch;
global.fetch.Promise = Promise;
Expand Down Expand Up @@ -184,7 +187,7 @@ global.document.emitEvent = (event, params) => {
global.document.documentElement = global.document.createElement();
global.document.body = new DOMElement();

global.XRRigidTransform = () => {};
global.XRRigidTransform = class {};

class Path2D {
moveTo() {}
Expand Down

0 comments on commit 4d4e28f

Please sign in to comment.