diff --git a/package.json b/package.json index c25ae6f261..f89d63ee6b 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "lint:root": "eslint tests", "build": "npm run build --workspace=packages --if-present", "pretest": "npm run build", - "serve": "http-server -c-1 -s -p 3000 . --cors --headers '{\"Cross-Origin-Embedder-Policy\":\"require-corp\",\"Cross-Origin-Opener-Policy\":\"same-origin\"}'", + "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\"}'", "test": "server-test test:browser:server 3000 test:all", "test:all": "npm-run-all test:browser:*:*", - "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", + "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", "test:browser:core:mt": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-core-mt.test.html", "test:browser:core:st": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-core-st.test.html", "test:browser:ffmpeg:mt": "npm run test:browser -- -f http://localhost:3000/tests/ffmpeg-mt.test.html", @@ -20,7 +20,8 @@ "test:node:core:mt": "npm run test:node -- --require tests/test-helper-mt.js tests/ffmpeg-core.test.js", "test:node:core:st": "npm run test:node -- --require tests/test-helper-st.js tests/ffmpeg-core.test.js", "prepublishOnly": "npm run build", - "postinstall": "npm run build" + "postinstall": "npm run build", + "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" }, "workspaces": [ "packages/*", diff --git a/tests/environment-check.test.html b/tests/environment-check.test.html new file mode 100644 index 0000000000..10ca4d9847 --- /dev/null +++ b/tests/environment-check.test.html @@ -0,0 +1,21 @@ + + + + + Environment Check + + + +
+ + + + + + +