Skip to content

Commit af7f279

Browse files
committed
debug GH actions browser environment
1 parent 8b3912f commit af7f279

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"lint:root": "eslint tests",
88
"build": "npm run build --workspace=packages --if-present",
99
"pretest": "npm run build",
10-
"serve": "http-server -c-1 -s -p 3000 . --cors --headers '{\"Cross-Origin-Embedder-Policy\":\"require-corp\",\"Cross-Origin-Opener-Policy\":\"same-origin\"}'",
10+
"serve": "http-server -c-1 -s -p 3000 . --cors --headers '{\"Cross-Origin-Embedder-Policy\":\"require-corp\",\"Cross-Origin-Opener-Policy\":\"same-origin\",\"Cross-Origin-Resource-Policy\":\"cross-origin\"}'",
1111
"test": "server-test test:browser:server 3000 test:all",
1212
"test:all": "npm-run-all test:browser:*:*",
13-
"test:browser": "mocha-headless-chrome --args=\"--enable-features=SharedArrayBuffer --enable-experimental-web-platform-features --cross-origin-isolated --allow-file-access-from-files\" -a no-sandbox",
13+
"test:browser": "mocha-headless-chrome --args=\"--enable-features=SharedArrayBuffer --enable-experimental-web-platform-features --cross-origin-isolated --allow-file-access-from-files --disable-web-security --allow-insecure-localhost --no-sandbox --disable-setuid-sandbox\" -a no-sandbox",
1414
"test:browser:core:mt": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-core-mt.test.html",
1515
"test:browser:core:st": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-core-st.test.html",
1616
"test:browser:ffmpeg:mt": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-mt.test.html",
@@ -20,7 +20,8 @@
2020
"test:node:core:mt": "npm run test:node -- --require tests/test-helper-mt.js tests/ffmpeg-core.test.js",
2121
"test:node:core:st": "npm run test:node -- --require tests/test-helper-st.js tests/ffmpeg-core.test.js",
2222
"prepublishOnly": "npm run build",
23-
"postinstall": "npm run build"
23+
"postinstall": "npm run build",
24+
"test:environment": "npm run serve & wait-on http://localhost:3000 && mocha-headless-chrome --args=\"--enable-features=SharedArrayBuffer --enable-experimental-web-platform-features --cross-origin-isolated --allow-file-access-from-files\" -a no-sandbox -f http://localhost:3000/tests/environment-check.test.html"
2425
},
2526
"workspaces": [
2627
"packages/*",

tests/environment-check.test.html

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Environment Check</title>
6+
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
7+
</head>
8+
<body>
9+
<div id="mocha"></div>
10+
<script src="../node_modules/mocha/mocha.js"></script>
11+
<script src="../node_modules/chai/chai.js"></script>
12+
<script>
13+
mocha.setup("bdd");
14+
window.expect = chai.expect;
15+
</script>
16+
<script src="./environment-check.test.js"></script>
17+
<script>
18+
mocha.run();
19+
</script>
20+
</body>
21+
</html>

0 commit comments

Comments
 (0)