Skip to content

Commit

Permalink
Move wpt folder
Browse files Browse the repository at this point in the history
  • Loading branch information
asamuzaK committed Nov 16, 2024
1 parent 72519fc commit 8f0e34d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
pull_request:
branches: [ main ]

defaults:
run:
shell: bash

jobs:
build:
strategy:
Expand All @@ -24,4 +28,9 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm test
- name: Test Windows
if: ${{ matrix.os == 'windows-latest' }}
run: npm run test-win
- name: Test
if: ${{ matrix.os != 'windows-latest' }}
run: npm test
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "test/wpt/wpt"]
path = test/wpt/wpt
[submodule "wpt/wpt"]
path = wpt/wpt
url = https://github.com/web-platform-tests/wpt.git
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default [
jsdoc.configs['flat/recommended'],
regexp.configs['flat/recommended'],
{
ignores: ['dist/', 'test/file/', 'test/wpt/', 'benchmark/']
ignores: ['dist/', 'test/file/', 'wpt/wpt/', 'benchmark/']
},
{
languageOptions: {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
"build": "npm run tsc && npm run lint && npm test && npm run compat",
"compat": "esbuild --format=cjs --platform=node --outdir=dist/cjs/ --minify --sourcemap src/**/*.js",
"lint": "eslint --fix .",
"test": "node --test --experimental-test-coverage test/*.test.js",
"test-wpt": "node test/wpt/wpt-runner.js",
"test": "node --test --experimental-test-coverage **/*.test.js",
"test-win": "node --test --experimental-test-coverage \"**/*.test.js\"",
"test-wpt": "node wpt/wpt-runner.js",
"tsc": "node scripts/index clean --dir=types -i && npx tsc",
"update-wpt": "git submodule update --init --recursive --remote"
},
Expand Down
1 change: 0 additions & 1 deletion test/wpt/wpt
Submodule wpt deleted from a52542
1 change: 1 addition & 0 deletions wpt/wpt
Submodule wpt added at 6cf69a
5 changes: 3 additions & 2 deletions test/wpt/wpt-runner.js → wpt/wpt-runner.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/**
* wpt-runner.js
*/
/* eslint-disable no-await-in-loop, n/no-callback-literal */

import wptRunner from 'wpt-runner';
import { DOMSelector } from '../../src/index.js';
import { DOMSelector } from '../src/index.js';

const setup = window => {
const domSelector = new DOMSelector(window);
Expand Down Expand Up @@ -198,7 +199,7 @@ const rootURLs = [
(async () => {
const res = [];
for (const rootURL of rootURLs) {
await wptRunner(`test/wpt/wpt/${rootURL}`, {
await wptRunner(`wpt/wpt/${rootURL}`, {
rootURL,
setup,
filter
Expand Down

0 comments on commit 8f0e34d

Please sign in to comment.