Skip to content

Commit 17e5ec0

Browse files
authored
fix cloud tests (#2613)
* Supply correct config for Sauce Labs tests * Inelegant (but working) Sauce Labs testing of browsers
1 parent 912c568 commit 17e5ec0

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

.min-wd

Lines changed: 0 additions & 15 deletions
This file was deleted.

mochify.webdriver.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
"use strict";
2+
const assert = require("node:assert");
3+
4+
assert(process.env.BROWSER_NAME);
5+
assert(process.env.SAUCE_USERNAME);
6+
assert(process.env.SAUCE_ACCESS_KEY);
27

38
module.exports = {
49
driver: "webdriver",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"test-dev": "npm run test-node -- -n watch -n watch-path=test --node-option watch-path=lib -R min",
3636
"test-headless": "mochify --driver puppeteer",
3737
"test-coverage": "nyc nyc --exclude-after-remap false mochify --driver puppeteer --bundle 'node coverage.cjs'",
38-
"test-cloud": "npm run test-headless -- --wd",
38+
"test-cloud": "./scripts/test-cloud.sh",
3939
"test-webworker": "mochify --driver puppeteer --serve . test/webworker/webworker-support-assessment.js",
4040
"test-esm-support": "mocha test/es2015/module-support-assessment-test.mjs",
4141
"test-esm-browser-build": "node test/es2015/check-esm-bundle-is-runnable.js",

scripts/test-cloud.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
BROWSER_NAME=MicrosoftEdge mochify -C mochify.webdriver.cjs \
4+
&& BROWSER_NAME=chrome mochify -C mochify.webdriver.cjs \
5+
&& BROWSER_NAME=firefox mochify -C mochify.webdriver.cjs

0 commit comments

Comments
 (0)