diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1ff3a2f..892cb71 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -16,8 +16,6 @@ jobs: with: node-version: '20.x' - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - run: npm run test:ci - uses: codecov/codecov-action@v4 with: diff --git a/package.json b/package.json index 9cb93e8..aef7415 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,9 @@ "main": "src/index.js", "type": "module", "scripts": { - "test": "web-test-runner --node--resolve --coverage", - "test:ci": "web-test-runner --node-resolve --coverage --playwright", + "setup-playwright": "npx playwright install --with-deps chromium firefox webkit", + "test": "npm run setup-playwright && web-test-runner --node-resolve --coverage --playwright --browsers chromium firefox webkit", + "test:ci": "npm run setup-playwright && web-test-runner --node-resolve --coverage --playwright --browsers chromium firefox webkit", "test:watch": "web-test-runner --node-resolve --coverage --watch", "lint": "eslint .", "docs": "npx jsdoc2md -c .jsdoc.json --files 'src/*.js' > docs/API.md",