Skip to content

Commit

Permalink
Fix broken Jasmine CI runs
Browse files Browse the repository at this point in the history
  • Loading branch information
EvHaus committed Mar 3, 2024
1 parent a9617ef commit fa59a0d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion benchmarks/jasmine/spec/helpers/happydom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ global.window = window;
// Register global window extensions
[
'document',
// NOTE: This is need for running tests on GitHub Actions CI, but causes
// failure on local builds due to this error:
// > Cannot set property navigator of #<Object> which has only a getter
'navigator',
'Element',
'getComputedStyle',
'HTMLElement',
'SVGElement'
].forEach((key) => {
global[key] = global.window[key];
try {
global[key] = global.window[key];
} catch (e) {
}
});

0 comments on commit fa59a0d

Please sign in to comment.