diff --git a/benchmarks/jasmine/spec/helpers/happydom.ts b/benchmarks/jasmine/spec/helpers/happydom.ts index ecfc539..477f48a 100644 --- a/benchmarks/jasmine/spec/helpers/happydom.ts +++ b/benchmarks/jasmine/spec/helpers/happydom.ts @@ -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 # 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) { + } }); \ No newline at end of file