Skip to content

Commit eb105b2

Browse files
committed
Fix browser tests by enabling SharedArrayBuffer
1 parent 0dedfc0 commit eb105b2

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

test/karma-webworker.conf.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,22 @@ module.exports = config => {
8181
autoWatch: true,
8282

8383
browsers: ["ChromeHeadless"],
84-
singleRun: true
84+
singleRun: true,
85+
86+
87+
// Allow SharedArrayBuffer: see https://web.dev/cross-origin-isolation-guide/
88+
customHeaders: [
89+
{
90+
match: ".*",
91+
name: "Cross-Origin-Opener-Policy",
92+
value: "same-origin"
93+
},
94+
{
95+
match: ".*",
96+
name: "Cross-Origin-Embedder-Policy",
97+
value: "require-corp"
98+
}
99+
]
85100
};
86101

87102
config.set(options);

test/karma.conf.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,21 @@ module.exports = config => {
5252
autoWatch: true,
5353

5454
browsers: ["ChromeHeadless"],
55-
singleRun: true
55+
singleRun: true,
56+
57+
// Allow SharedArrayBuffer: see https://web.dev/cross-origin-isolation-guide/
58+
customHeaders: [
59+
{
60+
match: ".*",
61+
name: "Cross-Origin-Opener-Policy",
62+
value: "same-origin"
63+
},
64+
{
65+
match: ".*",
66+
name: "Cross-Origin-Embedder-Policy",
67+
value: "require-corp"
68+
}
69+
]
5670
};
5771

5872
config.set(options);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy