Skip to content

Commit

Permalink
Specify browser as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorm committed Jan 17, 2024
1 parent f9e0c46 commit bd4d8aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"test:deno": "deno test --allow-read=./dist/ ./test/deno.test.js",
"test:bun": "bun test --cwd ./test/ bun",
"test:browser": "run-s test:browser:*",
"test:browser:chromium": "TEST_BROWSER=chromium node ./test/browser.test.js",
"test:browser:firefox": "TEST_BROWSER=firefox node ./test/browser.test.js",
"test:browser:webkit": "TEST_BROWSER=webkit node ./test/browser.test.js",
"test:browser:chromium": "node ./test/browser.test.js chromium",
"test:browser:firefox": "node ./test/browser.test.js firefox",
"test:browser:webkit": "node ./test/browser.test.js webkit",
"version": "run-s all && git add -A ./docs/"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/browser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const require = module.createRequire(import.meta.url);
* $ PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:3000/ npm run test:browser
*/

const browserName = process.env.TEST_BROWSER;
const browserName = process.argv[2];
const browserWsEndpoint = process.env.PW_TEST_CONNECT_WS_ENDPOINT;
const browser = browserWsEndpoint
? await playwright[browserName].connect(browserWsEndpoint)
Expand Down

0 comments on commit bd4d8aa

Please sign in to comment.