mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: rename mocha-runner (#10984)
This commit is contained in:
parent
18ba47e043
commit
d124c83dad
@ -239,7 +239,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
files: [
|
files: [
|
||||||
'packages/puppeteer-core/src/**/*.test.ts',
|
'packages/puppeteer-core/src/**/*.test.ts',
|
||||||
'tools/mochaRunner/src/test.ts',
|
'tools/mocha-runner/src/test.ts',
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
// With the Node.js test runner, `describe` and `it` are technically
|
// With the Node.js test runner, `describe` and `it` are technically
|
||||||
|
2
.github/workflows/changed-packages.yml
vendored
2
.github/workflows/changed-packages.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
|||||||
- 'docker/**'
|
- 'docker/**'
|
||||||
- 'test/**'
|
- 'test/**'
|
||||||
- 'test-d/**'
|
- 'test-d/**'
|
||||||
- 'tools/mochaRunner/**'
|
- 'tools/mocha-runner/**'
|
||||||
- '.mocharc.cjs'
|
- '.mocharc.cjs'
|
||||||
- 'tools/doctest/**'
|
- 'tools/doctest/**'
|
||||||
website:
|
website:
|
||||||
|
@ -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)
|
[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
|
to see if a given test result is expected or not. See more info about the test
|
||||||
runner in
|
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
|
### Unit tests
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ The following is a description of the primary folders in Puppeteer:
|
|||||||
- `test-d` contains type tests using
|
- `test-d` contains type tests using
|
||||||
[`tsd`](https://github.com/SamVerschueren/tsd).
|
[`tsd`](https://github.com/SamVerschueren/tsd).
|
||||||
- `tools` contains miscellaneous scripts that are used in building and etc.
|
- `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
|
## API guidelines
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ for details.
|
|||||||
If a test is expected to fail on certain configurations or became flaky, update
|
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)
|
[TestExpectations.json](https://github.com/puppeteer/puppeteer/blob/main/test/TestExpectations.json)
|
||||||
to reflect that. See more info about TestExpectations.json in
|
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
|
## API Coverage
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"test": {
|
"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": [
|
"dependencies": [
|
||||||
"./test:build"
|
"./test:build"
|
||||||
]
|
]
|
||||||
|
@ -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
|
## 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
|
## Running tests
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"../packages/testserver:build"
|
"../packages/testserver:build"
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
"../tools/mochaRunner/**",
|
"../tools/mocha-runner/**",
|
||||||
"src/**"
|
"src/**"
|
||||||
],
|
],
|
||||||
"output": [
|
"output": [
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
"rootDir": "src"
|
"rootDir": "src"
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"references": [{"path": "../tools/mochaRunner/tsconfig.json"}]
|
"references": [{"path": "../tools/mocha-runner/tsconfig.json"}]
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ It uses `/test/TestSuites.json` and `/test/TestExpectations.json` files to run m
|
|||||||
## Running tests for Mocha Runner itself.
|
## Running tests for Mocha Runner itself.
|
||||||
|
|
||||||
```bash
|
```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
|
## Running tests using Mocha Runner
|
@ -59,7 +59,7 @@ export interface MochaResults {
|
|||||||
pending: MochaTestResult[];
|
pending: MochaTestResult[];
|
||||||
passes: MochaTestResult[];
|
passes: MochaTestResult[];
|
||||||
failures: MochaTestResult[];
|
failures: MochaTestResult[];
|
||||||
// Added by mochaRunner.
|
// Added by mocha-runner.
|
||||||
updates?: RecommendedExpectation[];
|
updates?: RecommendedExpectation[];
|
||||||
parameters?: string[];
|
parameters?: string[];
|
||||||
platform?: string;
|
platform?: string;
|
Loading…
Reference in New Issue
Block a user