Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,10 @@ Enable it manually on each run via `-p` option:

npx codeceptjs run -p pauseOnFail

## reportData

TypeScript: Explicitly type reportData arrays as any\[] to avoid 'never' errors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielrentz I'm not sure if the \ here is intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kobenguyent As mentioned above... "Unrelated changes in plugins.md have been auto-generated by npm run docs."

No idea what to do about it. Even the git commit hooks manipulate these files, and confusingly in another way than the local build scripts. Will try to remove this change.

Another question... You changed the target branch from 3.x to 4.x a few weeks ago ... I did not notice this and thought I did that by mistake somehow, and therefore changed it back to 3.x. I remember that the PR did show dozens or hundrets of changed files when it has targeted 4.x. What is the desired way here? Is 3.x dead, and work continues in 4.x?


## retryFailedStep

Retries each failed step in a test.
Expand Down
4 changes: 2 additions & 2 deletions lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,10 @@ module.exports = {
/**
* @param {Mocha.Test} test
*/

started(test) {
if (outputLevel < 1) return
print(` ${colors.dim.bold('Scenario()')}`)
},

/**
* @param {Mocha.Test} test
*/
Expand Down Expand Up @@ -273,10 +271,12 @@ module.exports = {
},

/**
* Prints the stats of a test run to the console.
* @param {number} passed
* @param {number} failed
* @param {number} skipped
* @param {number|string} duration
* @param {number} [failedHooks]
*/
result(passed, failed, skipped, duration, failedHooks = 0) {
let style = colors.bgGreen
Expand Down
11 changes: 8 additions & 3 deletions lib/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ const { serializeTest } = require('./mocha/test')
* @property {number} duration Duration of the test run, in milliseconds.
*/

/**
* @typedef {Array<string|number>} Failure
* A detailed formatted report for a failed test.
*/

/**
* Result of a test run. Will be emitted for example in "event.all.result" events.
*/
Expand Down Expand Up @@ -48,7 +53,7 @@ class Result {
this._tests = []

/**
* @type {string[][]}
* @type {Failure[]}
* @private
*/
this._failures = []
Expand Down Expand Up @@ -91,7 +96,7 @@ class Result {
/**
* The failure reports (array of strings per failed test).
*
* @type {string[][]}
* @type {Failure[]}
* @readonly
*/
get failures() {
Expand Down Expand Up @@ -136,7 +141,7 @@ class Result {
/**
* Adds failure reports to this result.
*
* @param {string[][]} newFailures
* @param {Failure[]} newFailures
*/
addFailures(newFailures) {
this._failures.push(...newFailures)
Expand Down