Skip to content

Commit

Permalink
test: consolidate runner files (microsoft#3415)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Aug 12, 2020
1 parent 7e07634 commit 962ddc0
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 542 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Expand Up @@ -38,7 +38,7 @@ jobs:
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
# Wrap `npm run` in a subshell to redirect STDERR to file.
# Enable core dumps in the subshell.
- run: xvfb-run --auto-servernum -- bash -c "ulimit -c unlimited && node test/mocha/index.js --max-workers=1 --timeout=30000 && npm run coverage"
- run: xvfb-run --auto-servernum -- bash -c "ulimit -c unlimited && node test/runner --max-workers=1 --timeout=30000 && npm run coverage"
env:
BROWSER: ${{ matrix.browser }}
DEBUG: "pw:*,-pw:wrapped*,-pw:test*"
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- uses: microsoft/playwright-github-action@v1
- run: npm ci
- run: npm run build
- run: node test/mocha/index.js --max-workers=1 --timeout=30000
- run: node test/runner --max-workers=1 --timeout=30000
env:
BROWSER: ${{ matrix.browser }}
DEBUG: "pw:*,-pw:wrapped*,-pw:test*"
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- uses: microsoft/playwright-github-action@v1
- run: npm ci
- run: npm run build
- run: node test/mocha/index.js --max-workers=1 --timeout=30000
- run: node test/runner --max-workers=1 --timeout=30000
shell: bash
env:
BROWSER: ${{ matrix.browser }}
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
# Wrap `npm run` in a subshell to redirect STDERR to file.
# Enable core dumps in the subshell.
- run: xvfb-run --auto-servernum -- bash -c "ulimit -c unlimited && node test/mocha/index.js --max-workers=1 --timeout=30000"
- run: xvfb-run --auto-servernum -- bash -c "ulimit -c unlimited && node test/runner --max-workers=1 --timeout=30000"
if: ${{ always() }}
env:
BROWSER: ${{ matrix.browser }}
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
# Wrap `npm run` in a subshell to redirect STDERR to file.
# Enable core dumps in the subshell.
- run: xvfb-run --auto-servernum -- bash -c "ulimit -c unlimited && node test/mocha/index.js --max-workers=1 --timeout=30000"
- run: xvfb-run --auto-servernum -- bash -c "ulimit -c unlimited && node test/runner --max-workers=1 --timeout=30000"
env:
BROWSER: ${{ matrix.browser }}
DEBUG: "pw:*,-pw:wrapped*,-pw:test*"
Expand Down
28 changes: 0 additions & 28 deletions jest.config.js

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -9,9 +9,9 @@
"node": ">=10.15.0"
},
"scripts": {
"ctest": "cross-env BROWSER=chromium node test/mocha/index.js",
"ftest": "cross-env BROWSER=firefox node test/mocha/index.js",
"wtest": "cross-env BROWSER=webkit node test/mocha/index.js",
"ctest": "cross-env BROWSER=chromium node test/runner",
"ftest": "cross-env BROWSER=firefox node test/runner",
"wtest": "cross-env BROWSER=webkit node test/runner",
"test": "npm run ctest && npm run ftest && npm run wtest",
"eslint": "[ \"$CI\" = true ] && eslint --quiet -f codeframe --ext js,ts ./src || eslint --ext js,ts ./src",
"tsc": "tsc -p .",
Expand All @@ -30,7 +30,7 @@
"generate-channels": "node utils/generate_channels.js",
"typecheck-tests": "tsc -p ./test/",
"roll-browser": "node utils/roll_browser.js",
"coverage": "node test/jest/checkCoverage.js",
"coverage": "node test/runner/checkCoverage.js",
"check-deps": "node utils/check_deps.js"
},
"author": {
Expand Down
4 changes: 2 additions & 2 deletions test/base.fixture.ts
Expand Up @@ -22,8 +22,8 @@ import { TestServer } from '../utils/testserver/';
import { Connection } from '../lib/rpc/client/connection';
import { Transport } from '../lib/rpc/transport';
import { setUnderTest } from '../lib/helper';
import { installCoverageHooks } from './harness/coverage';
import { valueFromEnv } from './harness/utils';
import { installCoverageHooks } from './runner/coverage';
import { valueFromEnv } from './runner/utils';

setUnderTest(); // Note: we must call setUnderTest before requiring Playwright

Expand Down
69 changes: 0 additions & 69 deletions test/jest/dot.js

This file was deleted.

1 change: 0 additions & 1 deletion test/jest/index.js

This file was deleted.

178 changes: 0 additions & 178 deletions test/jest/playwrightEnvironment.js

This file was deleted.

0 comments on commit 962ddc0

Please sign in to comment.