Skip to content

Commit

Permalink
Fix browser tests by enabling SharedArrayBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Aug 1, 2021
1 parent 0dedfc0 commit eb105b2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
17 changes: 16 additions & 1 deletion test/karma-webworker.conf.js
Expand Up @@ -81,7 +81,22 @@ module.exports = config => {
autoWatch: true,

browsers: ["ChromeHeadless"],
singleRun: true
singleRun: true,


// Allow SharedArrayBuffer: see https://web.dev/cross-origin-isolation-guide/
customHeaders: [
{
match: ".*",
name: "Cross-Origin-Opener-Policy",
value: "same-origin"
},
{
match: ".*",
name: "Cross-Origin-Embedder-Policy",
value: "require-corp"
}
]
};

config.set(options);
Expand Down
16 changes: 15 additions & 1 deletion test/karma.conf.js
Expand Up @@ -52,7 +52,21 @@ module.exports = config => {
autoWatch: true,

browsers: ["ChromeHeadless"],
singleRun: true
singleRun: true,

// Allow SharedArrayBuffer: see https://web.dev/cross-origin-isolation-guide/
customHeaders: [
{
match: ".*",
name: "Cross-Origin-Opener-Policy",
value: "same-origin"
},
{
match: ".*",
name: "Cross-Origin-Embedder-Policy",
value: "require-corp"
}
]
};

config.set(options);
Expand Down

0 comments on commit eb105b2

Please sign in to comment.