diff --git a/.eslintrc.js b/.eslintrc.js index 6f44cd7f..310c44ea 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -239,7 +239,7 @@ module.exports = { { files: [ 'packages/puppeteer-core/src/**/*.test.ts', - 'tools/mochaRunner/src/test.ts', + 'tools/mocha-runner/src/test.ts', ], rules: { // With the Node.js test runner, `describe` and `it` are technically diff --git a/.github/workflows/changed-packages.yml b/.github/workflows/changed-packages.yml index 15044bf1..45ee1476 100644 --- a/.github/workflows/changed-packages.yml +++ b/.github/workflows/changed-packages.yml @@ -41,7 +41,7 @@ jobs: - 'docker/**' - 'test/**' - 'test-d/**' - - 'tools/mochaRunner/**' + - 'tools/mocha-runner/**' - '.mocharc.cjs' - 'tools/doctest/**' website: diff --git a/docs/contributing.md b/docs/contributing.md index 4bddec35..6cbcaf18 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -107,7 +107,7 @@ Puppeteer uses a custom test runner on top of Mocha that consults the [TestExpectations.json](https://github.com/puppeteer/puppeteer/blob/main/test/TestExpectations.json) to see if a given test result is expected or not. See more info about the test runner in -[`tools/mochaRunner`](https://github.com/puppeteer/puppeteer/tree/main/tools/mochaRunner). +[`tools/mocha-runner`](https://github.com/puppeteer/puppeteer/tree/main/tools/mocha-runner). ### Unit tests @@ -155,7 +155,7 @@ The following is a description of the primary folders in Puppeteer: - `test-d` contains type tests using [`tsd`](https://github.com/SamVerschueren/tsd). - `tools` contains miscellaneous scripts that are used in building and etc. -- `tools/mochaRunner` - contains the source code for our test runner. +- `tools/mocha-runner` - contains the source code for our test runner. ## API guidelines @@ -248,7 +248,7 @@ for details. If a test is expected to fail on certain configurations or became flaky, update [TestExpectations.json](https://github.com/puppeteer/puppeteer/blob/main/test/TestExpectations.json) to reflect that. See more info about TestExpectations.json in -[`tools/mochaRunner`](https://github.com/puppeteer/puppeteer/tree/main/tools/mochaRunner). +[`tools/mocha-runner`](https://github.com/puppeteer/puppeteer/tree/main/tools/mocha-runner). ## API Coverage diff --git a/package.json b/package.json index 31675a43..694724e9 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ ] }, "test": { - "command": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mochaRunner/lib/main.js --min-tests 1003", + "command": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mocha-runner/lib/main.js --min-tests 1003", "dependencies": [ "./test:build" ] diff --git a/test/README.md b/test/README.md index 1513a1b2..72085ecf 100644 --- a/test/README.md +++ b/test/README.md @@ -25,7 +25,7 @@ The best place to look is an existing test to see how they use the helpers. ## Skipping tests in specific conditions -To skip tests edit the [TestExpectations](https://github.com/puppeteer/puppeteer/blob/main/test/TestExpectations.json) file. See [test runner documentation](https://github.com/puppeteer/puppeteer/tree/main/tools/mochaRunner) for more details. +To skip tests edit the [TestExpectations](https://github.com/puppeteer/puppeteer/blob/main/test/TestExpectations.json) file. See [test runner documentation](https://github.com/puppeteer/puppeteer/tree/main/tools/mocha-runner) for more details. ## Running tests diff --git a/test/package.json b/test/package.json index 8f97ca95..ee07d0f7 100644 --- a/test/package.json +++ b/test/package.json @@ -15,7 +15,7 @@ "../packages/testserver:build" ], "files": [ - "../tools/mochaRunner/**", + "../tools/mocha-runner/**", "src/**" ], "output": [ diff --git a/test/tsconfig.json b/test/tsconfig.json index 46d51dda..a5e22137 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -7,5 +7,5 @@ "rootDir": "src" }, "include": ["src"], - "references": [{"path": "../tools/mochaRunner/tsconfig.json"}] + "references": [{"path": "../tools/mocha-runner/tsconfig.json"}] } diff --git a/tools/mochaRunner/README.md b/tools/mocha-runner/README.md similarity index 98% rename from tools/mochaRunner/README.md rename to tools/mocha-runner/README.md index 1e4398a6..f0107f19 100644 --- a/tools/mochaRunner/README.md +++ b/tools/mocha-runner/README.md @@ -6,7 +6,7 @@ It uses `/test/TestSuites.json` and `/test/TestExpectations.json` files to run m ## Running tests for Mocha Runner itself. ```bash -npm run build && npx c8 node tools/mochaRunner/lib/test.js +npm run build && npx c8 node tools/mocha-runner/lib/test.js ``` ## Running tests using Mocha Runner diff --git a/tools/mochaRunner/src/interface.ts b/tools/mocha-runner/src/interface.ts similarity index 100% rename from tools/mochaRunner/src/interface.ts rename to tools/mocha-runner/src/interface.ts diff --git a/tools/mochaRunner/src/main.ts b/tools/mocha-runner/src/main.ts similarity index 100% rename from tools/mochaRunner/src/main.ts rename to tools/mocha-runner/src/main.ts diff --git a/tools/mochaRunner/src/reporter.ts b/tools/mocha-runner/src/reporter.ts similarity index 100% rename from tools/mochaRunner/src/reporter.ts rename to tools/mocha-runner/src/reporter.ts diff --git a/tools/mochaRunner/src/test.ts b/tools/mocha-runner/src/test.ts similarity index 100% rename from tools/mochaRunner/src/test.ts rename to tools/mocha-runner/src/test.ts diff --git a/tools/mochaRunner/src/types.ts b/tools/mocha-runner/src/types.ts similarity index 98% rename from tools/mochaRunner/src/types.ts rename to tools/mocha-runner/src/types.ts index e270ce3a..360e3c32 100644 --- a/tools/mochaRunner/src/types.ts +++ b/tools/mocha-runner/src/types.ts @@ -59,7 +59,7 @@ export interface MochaResults { pending: MochaTestResult[]; passes: MochaTestResult[]; failures: MochaTestResult[]; - // Added by mochaRunner. + // Added by mocha-runner. updates?: RecommendedExpectation[]; parameters?: string[]; platform?: string; diff --git a/tools/mochaRunner/src/utils.ts b/tools/mocha-runner/src/utils.ts similarity index 100% rename from tools/mochaRunner/src/utils.ts rename to tools/mocha-runner/src/utils.ts diff --git a/tools/mochaRunner/tsconfig.json b/tools/mocha-runner/tsconfig.json similarity index 100% rename from tools/mochaRunner/tsconfig.json rename to tools/mocha-runner/tsconfig.json