From 03fbbd7bc7b37027027cc0560f4fab1230ffc22e Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Thu, 24 Mar 2022 15:32:25 +1000 Subject: [PATCH] chore: migrate mochaEvents integration tests from runner to app (#20678) * mocha-events * wip * work on snapshots tests * update * lint * remove unused code * revert some changes * remove old code * migrate retries tests to app * reduce duplication * remove old code * rename method * use disparity --- .../e2e/runner/retries.mochaEvents.cy.ts | 136 + .../runner/retries.mochaEvents.snapshots.ts | 7120 +++++++++++++++++ .../e2e/runner/runner.mochaEvents.cy.ts | 125 + .../runner/runner.mochaEvents.snapshots.ts | 3110 +++++++ .../e2e/runner/support/mochaEventsUtils.ts | 189 + .../cypress/e2e/runner/support/mochaTypes.ts | 23 + .../cypress/e2e/runner/support/spec-loader.ts | 22 +- packages/app/package.json | 1 + .../app/src/runner/event-manager-types.ts | 2 + packages/app/src/runner/event-manager.ts | 21 +- packages/driver/src/cypress.ts | 42 + .../cypress/e2e/support/e2eProjectDirs.ts | 1 + .../__snapshots__/runner.mochaEvents.cy.js | 3253 -------- .../cypress/e2e/retries.mochaEvents.cy.js | 165 +- .../cypress/e2e/runner.mochaEvents.cy.js | 157 +- ...y-from-afterEach.retries.mochaEvents.cy.js | 37 + ...-from-beforeEach.retries.mochaEvents.cy.js | 20 + ...retry-from-after.retries.mochaEvents.cy.js | 17 + ...etry-from-before.retries.mochaEvents.cy.js | 17 + .../runner/does-not-serialize-dom-error.cy.js | 4 + .../runner/fail-with-after.mochaEvents.cy.js | 8 + .../fail-with-afterEach.mochaEvents.cy.js | 7 + .../runner/fail-with-before.mochaEvents.cy.js | 7 + .../fail-with-beforeEach.mochaEvents.cy.js | 7 + .../runner/fail-with-only.mochaEvents.cy.js | 19 + .../runner/pass-with-only.mochaEvents.cy.js | 11 + .../simple-fail.retries.mochaEvents.cy.js | 10 + .../simple-single-test.mochaEvents.cy.js | 3 + ...retry-with-hooks.retries.mochaEvents.cy.js | 15 + ...-retry-with-only.retries.mochaEvents.cy.js | 20 + .../three-tests-with-hooks.mochaEvents.cy.js | 10 + ...tests-with-retry.retries.mochaEvents.cy.js | 19 + .../cypress/fixtures/dom.html | 675 ++ yarn.lock | 10 +- 34 files changed, 11707 insertions(+), 3576 deletions(-) create mode 100644 packages/app/cypress/e2e/runner/retries.mochaEvents.cy.ts create mode 100644 packages/app/cypress/e2e/runner/retries.mochaEvents.snapshots.ts create mode 100644 packages/app/cypress/e2e/runner/runner.mochaEvents.cy.ts create mode 100644 packages/app/cypress/e2e/runner/runner.mochaEvents.snapshots.ts create mode 100644 packages/app/cypress/e2e/runner/support/mochaEventsUtils.ts create mode 100644 packages/app/cypress/e2e/runner/support/mochaTypes.ts create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/can-retry-from-afterEach.retries.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/can-retry-from-beforeEach.retries.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/cant-retry-from-after.retries.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/cant-retry-from-before.retries.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/does-not-serialize-dom-error.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-after.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-afterEach.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-before.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-beforeEach.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-only.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/pass-with-only.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/simple-fail.retries.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/simple-single-test.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/test-retry-with-hooks.retries.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/test-retry-with-only.retries.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/three-tests-with-hooks.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/e2e/runner/three-tests-with-retry.retries.mochaEvents.cy.js create mode 100644 system-tests/projects/runner-e2e-specs/cypress/fixtures/dom.html diff --git a/packages/app/cypress/e2e/runner/retries.mochaEvents.cy.ts b/packages/app/cypress/e2e/runner/retries.mochaEvents.cy.ts new file mode 100644 index 0000000000..8ad4077cd9 --- /dev/null +++ b/packages/app/cypress/e2e/runner/retries.mochaEvents.cy.ts @@ -0,0 +1,136 @@ +import { runSpec } from './support/spec-loader' +import { runCypressInCypressMochaEventsTest } from './support/mochaEventsUtils' +import { snapshots } from './retries.mochaEvents.snapshots' + +describe('src/cypress/runner retries mochaEvents', { retries: 0 }, () => { + // NOTE: for test-retries + + it('simple retry', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents simple retry #1', + done, + ) + + runSpec({ + fileName: 'simple-fail.retries.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('test retry with hooks', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents test retry with hooks #1', + done, + ) + + runSpec({ + fileName: 'test-retry-with-hooks.retries.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('test retry with hooks', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents test retry with hooks #1', + done, + ) + + runSpec({ + fileName: 'test-retry-with-hooks.retries.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('test retry with [only]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents test retry with [only] #1', + done, + ) + + runSpec({ + fileName: 'test-retry-with-only.retries.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('can retry from [beforeEach]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents can retry from [beforeEach] #1', + done, + ) + + runSpec({ + fileName: 'can-retry-from-beforeEach.retries.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('can retry from [afterEach]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents can retry from [afterEach] #1', + done, + ) + + runSpec({ + fileName: 'can-retry-from-afterEach.retries.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('cant retry from [before]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents cant retry from [before] #1', + done, + ) + + runSpec({ + fileName: 'cant-retry-from-before.retries.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('three tests with retry', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents three tests with retry #1', + done, + ) + + runSpec({ + fileName: 'three-tests-with-retry.retries.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + describe('cleanses errors before emitting', () => { + it('does not try to serialize error with err.actual as DOM node', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner retries mochaEvents cleanses errors before emitting does not try to serialize error with err.actual as DOM node #1', + done, + ) + + runSpec({ + fileName: 'does-not-serialize-dom-error.cy.js', + }).then((win) => { + // should not have err.actual, expected properties since the subject is a DOM element + assertMatchingSnapshot(win) + }) + }) + }) +}) diff --git a/packages/app/cypress/e2e/runner/retries.mochaEvents.snapshots.ts b/packages/app/cypress/e2e/runner/retries.mochaEvents.snapshots.ts new file mode 100644 index 0000000000..9bfabdb791 --- /dev/null +++ b/packages/app/cypress/e2e/runner/retries.mochaEvents.snapshots.ts @@ -0,0 +1,7120 @@ +export const snapshots = { + 'src/cypress/runner retries mochaEvents simple retry #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner retries mochaEvents test retry with hooks #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner retries mochaEvents test retry with [only] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner retries mochaEvents can retry from [beforeEach] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'before each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h3', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'before each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h3', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h5', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h5', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner retries mochaEvents can retry from [afterEach] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'after each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'after each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h5', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h5', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r6', + 'title': 'suite 2', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r7', + 'order': 4, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r7', + 'order': 4, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h7', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r7', + 'order': 4, + 'title': 'test 1', + 'hookName': 'after each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h7', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h7', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h7', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r7', + 'order': 4, + 'title': 'test 1', + 'hookName': 'after each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h7', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h7', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r7', + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h7', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r7', + 'title': 'test 1', + 'hookName': 'after each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h7', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h7', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': false, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h7', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r7', + 'title': 'test 1', + 'hookName': 'after each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h7', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h7', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': false, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r7', + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h7', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h7', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r7', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r7', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h7', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r7', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h7', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r7', + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h7', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r6', + 'title': 'suite 2', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r8', + 'title': 'suite 3', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r9', + 'order': 5, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r9', + 'order': 5, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r9', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r9', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': 'relative/path/to/spec.js', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r9', + 'order': 5, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r9', + 'order': 5, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r8', + 'title': 'suite 3', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r9', + 'order': 5, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner retries mochaEvents cant retry from [before] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'fail', + { + 'id': 'r3', + 'title': '"before all" hook for "test 1"', + 'hookName': 'before all', + 'hookId': 'h1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'originalTitle': '"before all" hook', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'before all', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'before all', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner retries mochaEvents cant retry from [after] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h5', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h5', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h6', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'fail', + { + 'id': 'r3', + 'title': '"after all" hook for "test 1"', + 'hookName': 'after all', + 'hookId': 'h4', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'originalTitle': '"after all" hook', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'after all', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h4', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'after all', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h4', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h5', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + { + 'hookId': 'h6', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner retries mochaEvents three tests with retry #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r4', + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r4', + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': false, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r4', + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': false, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r4', + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r4', + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r4', + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r4', + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'final': true, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner retries mochaEvents screenshots retry screenshot in test body #1': [ + 'take:screenshot', + { + 'titles': [ + 'suite 1', + 'test 1', + ], + 'testId': 'r3', + 'testAttemptIndex': 'match.match(0)', + 'capture': 'fullPage', + 'clip': { + 'x': 0, + 'y': 0, + 'width': 1000, + 'height': 660, + }, + 'viewport': { + 'width': 1000, + 'height': 660, + }, + 'scaled': false, + 'blackout': [], + 'overwrite': false, + 'startTime': 'match.string', + 'current': 1, + 'total': 1, + }, + ], + + 'src/cypress/runner retries mochaEvents screenshots retry screenshot in test body #2': { + 'id': 'r3', + 'testAttemptIndex': 'match.match(0)', + 'isOpen': false, + 'appOnly': true, + 'scale': false, + 'waitForCommandSynchronization': false, + 'disableTimersAndAnimations': true, + 'blackout': [], + 'overwrite': false, + }, + + 'src/cypress/runner retries mochaEvents cleanses errors before emitting does not try to serialize error with err.actual as DOM node #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r2', + 'order': 1, + 'title': 'visits', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r2', + 'order': 1, + 'title': 'visits', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r2', + 'order': 1, + 'title': 'visits', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r2', + 'order': 1, + 'title': 'visits', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': false, + 'currentRetry': 0, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r2', + 'title': 'visits', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'retry', + { + 'id': 'r2', + 'title': 'visits', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'final': false, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r2', + 'title': 'visits', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'final': false, + 'currentRetry': 1, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r2', + 'title': 'visits', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'fail', + { + 'id': 'r2', + 'title': 'visits', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r2', + 'title': 'visits', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'final': true, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r2', + 'title': 'visits', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'final': true, + 'currentRetry': 2, + 'retries': 2, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], +} as const diff --git a/packages/app/cypress/e2e/runner/runner.mochaEvents.cy.ts b/packages/app/cypress/e2e/runner/runner.mochaEvents.cy.ts new file mode 100644 index 0000000000..6f3c276cdf --- /dev/null +++ b/packages/app/cypress/e2e/runner/runner.mochaEvents.cy.ts @@ -0,0 +1,125 @@ +import { runSpec } from './support/spec-loader' +import { runCypressInCypressMochaEventsTest } from './support/mochaEventsUtils' +import { snapshots } from './runner.mochaEvents.snapshots' + +describe('src/cypress/runner', { retries: 0 }, () => { + describe('tests finish with correct state', () => { + describe('hook failures', () => { + it('fail in [before]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner tests finish with correct state hook failures fail in [before] #1', + done, + ) + + runSpec({ + fileName: 'fail-with-before.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('fail in [beforeEach]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner tests finish with correct state hook failures fail in [beforeEach] #1', + done, + ) + + runSpec({ + fileName: 'fail-with-beforeEach.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('fail in [after]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner tests finish with correct state hook failures fail in [after] #1', + done, + ) + + runSpec({ + fileName: 'fail-with-after.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('fail in [afterEach]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner tests finish with correct state hook failures fail in [afterEach] #1', + done, + ) + + runSpec({ + fileName: 'fail-with-afterEach.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + }) + + describe('mocha grep', () => { + it('fail with [only]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner tests finish with correct state mocha grep fail with [only] #1', + done, + ) + + runSpec({ + fileName: 'fail-with-only.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('pass with [only]', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner tests finish with correct state mocha grep pass with [only] #1', + done, + ) + + runSpec({ + fileName: 'pass-with-only.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + }) + }) + + describe('mocha events', () => { + it('simple single test', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner mocha events simple single test #1', + done, + ) + + runSpec({ + fileName: 'simple-single-test.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + + it('simple three tests', (done) => { + const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( + snapshots, + 'src/cypress/runner mocha events simple three tests #1', + done, + ) + + runSpec({ + fileName: 'three-tests-with-hooks.mochaEvents.cy.js', + }).then((win) => { + assertMatchingSnapshot(win) + }) + }) + }) +}) diff --git a/packages/app/cypress/e2e/runner/runner.mochaEvents.snapshots.ts b/packages/app/cypress/e2e/runner/runner.mochaEvents.snapshots.ts new file mode 100644 index 0000000000..d3819b964d --- /dev/null +++ b/packages/app/cypress/e2e/runner/runner.mochaEvents.snapshots.ts @@ -0,0 +1,3110 @@ +export const snapshots = { + 'src/cypress/runner tests finish with correct state hook failures fail in [before] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'fail', + { + 'id': 'r3', + 'title': '"before all" hook for "test 1"', + 'hookName': 'before all', + 'hookId': 'h1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'originalTitle': '"before all" hook', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'before all', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'before all', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner tests finish with correct state hook failures fail in [beforeEach] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'fail', + { + 'id': 'r3', + 'title': '"before each" hook for "test 1"', + 'hookName': 'before each', + 'hookId': 'h1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'originalTitle': '"before each" hook', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'before each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'before each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner tests finish with correct state hook failures fail in [afterEach] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'fail', + { + 'id': 'r3', + 'title': '"after each" hook for "test 1"', + 'hookName': 'after each', + 'hookId': 'h1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'originalTitle': '"after each" hook', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'after each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'hookName': 'after each', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner tests finish with correct state hook failures fail in [after] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'fail', + { + 'id': 'r4', + 'title': '"after all" hook for "test 2"', + 'hookName': 'after all', + 'hookId': 'h1', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'originalTitle': '"after all" hook', + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'hookName': 'after all', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'hookName': 'after all', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'failedFromHookId': 'h1', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner tests finish with correct state mocha grep fail with [only] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'fail', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'err': { + 'message': '[error message]', + 'name': 'AssertionError', + 'stack': 'match.string', + 'sourceMappedStack': 'match.string', + 'parsedStack': 'match.array', + }, + 'state': 'failed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner tests finish with correct state mocha grep pass with [only] #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'serialize state - hooks': { + 'currentId': 'r6', + 'tests': '{Object 2}', + 'startTime': '1970-01-01T00:00:00.000Z', + 'emissions': { + 'started': { + 'r1': true, + 'r2': true, + 'r3': true, + 'r4': true, + 'r5': true, + 'r6': true, + }, + 'ended': { + 'r3': true, + 'r2': true, + 'r5': true, + }, + }, + 'passed': 2, + 'failed': 0, + 'pending': 0, + 'numLogs': 0, + }, + + 'src/cypress/runner other specs screenshots screenshot after failed test #1': [ + [ + 'take:screenshot', + { + 'titles': [ + 'suite 1', + 'test 1', + ], + 'testId': 'r3', + 'testAttemptIndex': 0, + 'simple': true, + 'testFailure': true, + 'capture': 'runner', + 'clip': { + 'x': 0, + 'y': 0, + 'width': 1000, + 'height': 660, + }, + 'viewport': { + 'width': 1000, + 'height': 660, + }, + 'scaled': true, + 'blackout': [], + 'overwrite': false, + 'startTime': '1970-01-01T00:00:00.000Z', + }, + ], + ], + + 'src/cypress/runner mocha events simple single test #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], + + 'src/cypress/runner mocha events simple three tests #1': [ + [ + 'mocha', + 'start', + { + 'start': 'match.date', + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before all" hook', + 'hookName': 'before all', + 'hookId': 'h1', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r3', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r3', + 'order': 1, + 'title': 'test 1', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before all': [ + { + 'hookId': 'h1', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r4', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r4', + 'order': 2, + 'title': 'test 2', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'body': '[body]', + 'type': 'test', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:before:run', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'body': '[body]', + 'type': 'test', + 'wallClockStartedAt': 'match.date', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"before each" hook', + 'hookName': 'before each', + 'hookId': 'h2', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"after each" hook', + 'hookName': 'after each', + 'hookId': 'h4', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook', + { + 'id': 'r5', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'hook end', + { + 'id': 'r5', + 'title': '"after all" hook', + 'hookName': 'after all', + 'hookId': 'h3', + 'body': '[body]', + 'type': 'hook', + 'duration': 'match.number', + 'file': null, + 'invocationDetails': '{Object 9}', + 'currentRetry': 0, + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'pass', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test end', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r2', + 'title': 'suite 1', + 'root': false, + 'type': 'suite', + 'file': null, + 'invocationDetails': '{Object 9}', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'test:after:run', + { + 'id': 'r5', + 'order': 3, + 'title': 'test 3', + 'state': 'passed', + 'body': '[body]', + 'type': 'test', + 'duration': 'match.number', + 'wallClockStartedAt': 'match.date', + 'wallClockDuration': 'match.number', + 'timings': { + 'lifecycle': 'match.number', + 'before each': [ + { + 'hookId': 'h2', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'test': { + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + 'after each': [ + { + 'hookId': 'h4', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + 'after all': [ + { + 'hookId': 'h3', + 'fnDuration': 'match.number', + 'afterFnDuration': 'match.number', + }, + ], + }, + 'file': null, + 'invocationDetails': '{Object 9}', + 'final': true, + 'currentRetry': 0, + 'retries': 0, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'suite end', + { + 'id': 'r1', + 'title': '', + 'root': true, + 'type': 'suite', + 'file': 'relative/path/to/spec.js', + 'retries': -1, + '_slow': 10000, + }, + ], + [ + 'mocha', + 'end', + { + 'end': 'match.date', + }, + ], + ], +} as const diff --git a/packages/app/cypress/e2e/runner/support/mochaEventsUtils.ts b/packages/app/cypress/e2e/runner/support/mochaEventsUtils.ts new file mode 100644 index 0000000000..d8cf18c49f --- /dev/null +++ b/packages/app/cypress/e2e/runner/support/mochaEventsUtils.ts @@ -0,0 +1,189 @@ +import type { CypressInCypressMochaEvent } from '../../../../src/runner/event-manager' +import _ from 'lodash' +import type { MochaLifecycleData, SanitizedMochaLifecycleData } from './mochaTypes' +import EventEmitter from 'events' +import disparity from 'disparity' + +const hooks = { + before: ['before all', 'before each'], + after: ['after each', 'after all'], +} as const + +const stringifyShort = (obj: Record) => { + const constructorName = _.get(obj, 'constructor.name') + + if (constructorName && !_.includes(['Object', 'Array'], constructorName)) { + return `{${constructorName}}` + } + + if (_.isArray(obj)) { + return `[Array ${obj.length}]` + } + + if (_.isObject(obj)) { + return `{Object ${Object.keys(obj).length}}` + } + + return obj +} + +const eventCleanseMap = { + snapshots: stringifyShort, + parent: stringifyShort, + tests: stringifyShort, + commands: stringifyShort, + invocationDetails: stringifyShort, + body: () => '[body]', + wallClockStartedAt: () => 'match.date', + lifecycle: () => 'match.number', + fnDuration: () => 'match.number', + duration: () => 'match.number', + afterFnDuration: () => 'match.number', + wallClockDuration: () => 'match.number', + stack: () => 'match.string', + file: (arg: string) => arg ? 'relative/path/to/spec.js' : undefined, + message: () => '[error message]', + sourceMappedStack: () => 'match.string', + parsedStack: () => 'match.array', + name: (n: string) => n === 'Error' ? 'AssertionError' : n, + err: () => { + return { + message: '[error message]', + name: 'AssertionError', + stack: 'match.string', + sourceMappedStack: 'match.string', + parsedStack: 'match.array', + } + }, + startTime: new Date(0), + start: () => 'match.date', + end: () => 'match.date', + timings: (arg: MochaLifecycleData): SanitizedMochaLifecycleData => { + let sanitizedLifecycleData: SanitizedMochaLifecycleData = { + lifecycle: 'match.number', + } + + for (const hook of hooks.before) { + const hooksToSanitize = arg[hook] + + if (!hooksToSanitize) { + continue + } + + sanitizedLifecycleData[hook] = hooksToSanitize.map((oldHook) => { + return { + hookId: oldHook.hookId, + fnDuration: 'match.number', + afterFnDuration: 'match.number', + } + }) + } + + if (arg.test) { + sanitizedLifecycleData.test = { + fnDuration: 'match.number', + afterFnDuration: 'match.number', + } + } + + for (const hook of hooks.after) { + const hooksToSanitize = arg[hook] + + if (!hooksToSanitize) { + continue + } + + sanitizedLifecycleData[hook] = hooksToSanitize.map((oldHook) => { + return { + hookId: oldHook.hookId, + fnDuration: 'match.number', + afterFnDuration: 'match.number', + } + }) + } + + return sanitizedLifecycleData + }, +} + +const keysToEliminate = ['codeFrame', '_testConfig'] as const + +function removeUnusedKeysForTestSnapshot (obj: T): T { + for (const key of keysToEliminate) { + delete obj[key] + } + + for (const [key, value] of Object.entries(obj)) { + if (key in obj) { + const transform = eventCleanseMap[key]?.(value) + + if (!transform) { + continue + } + + obj[key] = transform + } else { + delete obj[key] + } + } + + return obj +} + +declare global { + interface Window { + bus: EventEmitter + } +} + +class SnapshotError extends Error { + constructor (message: string) { + super() + this.message = `\n${message}` + } +} + +export function runCypressInCypressMochaEventsTest (snapshots: T, snapToCompare: keyof T, done: Mocha.Done) { + const bus = new EventEmitter() + const outerRunner = window.top!.window + + outerRunner.bus = bus + + // TODO: Can we automate writing the snapshots to disk? + // For some reason `cy.task('getSnapshot')` has problems when executed in + // "cypress in cypress" + bus.on('assert:cypress:in:cypress', (snapshot: CypressInCypressMochaEvent[]) => { + const expected = snapshots[snapToCompare] + const diff = disparity.unifiedNoColor(JSON.stringify(snapshot, null, 2), JSON.stringify(expected, null, 2), {}) + + if (diff !== '') { + /* eslint-disable no-console */ + console.info('Received snapshot:', JSON.stringify(snapshot, null, 2)) + throw new SnapshotError(diff) + } + + done() + }) + + const assertMatchingSnapshot = (win: Cypress.AUTWindow) => { + win.getEventManager().on('cypress:in:cypress:run:complete', (args: CypressInCypressMochaEvent[]) => { + const data = sanitizeMochaEvents(args) + + bus.emit('assert:cypress:in:cypress', data) + }) + } + + return { assertMatchingSnapshot } +} + +function sanitizeMochaEvents (args: CypressInCypressMochaEvent[]) { + return args.map((mochaEvent) => { + return mochaEvent.map((payload) => { + if (typeof payload === 'string') { + return payload + } + + return removeUnusedKeysForTestSnapshot(payload) + }) + }) +} diff --git a/packages/app/cypress/e2e/runner/support/mochaTypes.ts b/packages/app/cypress/e2e/runner/support/mochaTypes.ts new file mode 100644 index 0000000000..f34415742f --- /dev/null +++ b/packages/app/cypress/e2e/runner/support/mochaTypes.ts @@ -0,0 +1,23 @@ +export type Timing = { + hookId: `h${number}` + fnDuration: number + afterFnDuration: number +} + +export type SanitizedTiming = { + hookId?: `h${number}` + fnDuration: 'match.number' + afterFnDuration: 'match.number' +} + +export type MochaLifecycleBase = { + 'test'?: T + 'before each'?: T[] + 'after each'?: T[] + 'before all'?: T[] + 'after all'?: T[] +} + +export type MochaLifecycleData = MochaLifecycleBase & { lifecycle: number } + +export type SanitizedMochaLifecycleData = MochaLifecycleBase & { lifecycle: string } diff --git a/packages/app/cypress/e2e/runner/support/spec-loader.ts b/packages/app/cypress/e2e/runner/support/spec-loader.ts index c0ef11f88c..39cc23d10d 100644 --- a/packages/app/cypress/e2e/runner/support/spec-loader.ts +++ b/packages/app/cypress/e2e/runner/support/spec-loader.ts @@ -21,7 +21,7 @@ export type LoadSpecOptions = { hasPreferredIde?: boolean } -export function loadSpec (options: LoadSpecOptions): void { +export function loadSpec (options: LoadSpecOptions) { const { fileName, setup, @@ -78,3 +78,23 @@ export function loadSpec (options: LoadSpecOptions): void { // Wait for specs to complete shouldHaveTestResults({ passCount, failCount, pendingCount }) } + +export function runSpec ({ fileName }: { fileName: string }) { + cy.scaffoldProject('runner-e2e-specs') + cy.openProject('runner-e2e-specs') + cy.startAppServer() + + cy.__incorrectlyVisitAppWithIntercept() + + cy.findByLabelText('Search Specs').type(fileName) + // wait for virtualized spec list to update, there is a chance + // of disconnection otherwise + cy.wait(500) + cy.contains('[data-cy=spec-item]', fileName).click() + + cy.location().should((location) => { + expect(location.hash).to.contain(fileName) + }) + + return cy.window() +} diff --git a/packages/app/package.json b/packages/app/package.json index f03b8950cb..d8a3c7292a 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -43,6 +43,7 @@ "concurrently": "^6.2.0", "cross-env": "6.0.3", "cypress-real-events": "1.6.0", + "disparity": "^3.0.0", "faker": "5.5.3", "fuzzysort": "^1.1.4", "graphql": "^15.5.1", diff --git a/packages/app/src/runner/event-manager-types.ts b/packages/app/src/runner/event-manager-types.ts index b03e68631e..5d77d2a1bf 100644 --- a/packages/app/src/runner/event-manager-types.ts +++ b/packages/app/src/runner/event-manager-types.ts @@ -1,5 +1,6 @@ import type { FileDetails } from '@packages/types' import type { ScriptError } from '../store' +import type { CypressInCypressMochaEvent } from './event-manager' interface BeforeScreenshot { appOnly: boolean @@ -21,6 +22,7 @@ export type LocalBusEventMap = { export type LocalBusEmitsMap = { 'open:file': FileDetails + 'cypress:in:cypress:run:complete': CypressInCypressMochaEvent[] } export type SocketToDriverMap = { diff --git a/packages/app/src/runner/event-manager.ts b/packages/app/src/runner/event-manager.ts index 4093864d01..817b875049 100644 --- a/packages/app/src/runner/event-manager.ts +++ b/packages/app/src/runner/event-manager.ts @@ -11,6 +11,8 @@ import { logger } from './logger' import type { Socket } from '@packages/socket/lib/browser' import { useRunnerUiStore } from '../store' +export type CypressInCypressMochaEvent = Array>> + // type is default export of '@packages/driver' // cannot import because it's not type safe and tsc throw many type errors. type $Cypress = any @@ -26,7 +28,7 @@ const driverToReporterEvents = 'paused session:add'.split(' ') const driverToLocalAndReporterEvents = 'run:start run:end'.split(' ') const driverToSocketEvents = 'backend:request automation:request mocha recorder:frame'.split(' ') const driverTestEvents = 'test:before:run:async test:after:run'.split(' ') -const driverToLocalEvents = 'viewport:changed config stop url:changed page:loading visit:failed visit:blank'.split(' ') +const driverToLocalEvents = 'viewport:changed config stop url:changed page:loading visit:failed visit:blank cypress:in:cypress:runner:event'.split(' ') const socketRerunEvents = 'runner:restart watched:file:changed'.split(' ') const socketToDriverEvents = 'net:stubbing:event request:event script:error'.split(' ') const localToReporterEvents = 'reporter:log:add reporter:log:state:changed reporter:log:remove'.split(' ') @@ -42,6 +44,7 @@ export class EventManager { Cypress?: $Cypress studioRecorder: any selectorPlaygroundModel: any + cypressInCypressMochaEvents: CypressInCypressMochaEvent[] = [] constructor ( // import '@packages/driver' @@ -531,6 +534,22 @@ export class EventManager { driverToLocalEvents.forEach((event) => { Cypress.on(event, (...args: unknown[]) => { + // special case for asserting the correct mocha events + payload + // is emitted from cypress/driver when running e2e tests using + // "cypress in cypress" + if (event === 'cypress:in:cypress:runner:event') { + this.cypressInCypressMochaEvents.push(args as CypressInCypressMochaEvent[]) + + if (args[0] === 'mocha' && args[1] === 'end') { + this.emit('cypress:in:cypress:run:complete', this.cypressInCypressMochaEvents) + + // reset + this.cypressInCypressMochaEvents = [] + } + + return + } + // @ts-ignore // TODO: UNIFY-1318 - strongly typed event emitter. return this.emit(event, ...args) diff --git a/packages/driver/src/cypress.ts b/packages/driver/src/cypress.ts index 4fadb78551..bce56da8c5 100644 --- a/packages/driver/src/cypress.ts +++ b/packages/driver/src/cypress.ts @@ -72,6 +72,9 @@ interface AutomationError extends Error { automation: boolean } +// Are we running Cypress in Cypress? (Used for E2E Testing for Cypress in Cypress only) +const isCypressInCypress = document.defaultView !== top + class $Cypress { cy: any chai: any @@ -372,6 +375,17 @@ class $Cypress { }) } + maybeEmitCypressInCypress (...args: unknown[]) { + // emit an event if we are running a Cypress in Cypress E2E Test. + // used to assert the runner (mocha) is emitting the expected + // events/payload. + if (!isCypressInCypress) { + return + } + + this.emit('cypress:in:cypress:runner:event', ...args) + } + action (eventName, ...args) { // normalizes all the various ways // other objects communicate intent @@ -397,6 +411,8 @@ class $Cypress { return } + this.maybeEmitCypressInCypress('mocha', 'start', args[0]) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'start', args[0]) } @@ -415,6 +431,8 @@ class $Cypress { // test:after:run events ourselves this.emit('run:end') + this.maybeEmitCypressInCypress('mocha', 'end', args[0]) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'end', args[0]) } @@ -423,6 +441,8 @@ class $Cypress { case 'runner:suite:start': // mocha runner started processing a suite + this.maybeEmitCypressInCypress('mocha', 'suite', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'suite', ...args) } @@ -431,6 +451,8 @@ class $Cypress { case 'runner:suite:end': // mocha runner finished processing a suite + this.maybeEmitCypressInCypress('mocha', 'suite end', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'suite end', ...args) } @@ -439,6 +461,9 @@ class $Cypress { case 'runner:hook:start': // mocha runner started processing a hook + + this.maybeEmitCypressInCypress('mocha', 'hook', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'hook', ...args) } @@ -447,6 +472,8 @@ class $Cypress { case 'runner:hook:end': // mocha runner finished processing a hook + this.maybeEmitCypressInCypress('mocha', 'hook end', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'hook end', ...args) } @@ -455,6 +482,8 @@ class $Cypress { case 'runner:test:start': // mocha runner started processing a hook + this.maybeEmitCypressInCypress('mocha', 'test', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'test', ...args) } @@ -462,6 +491,8 @@ class $Cypress { break case 'runner:test:end': + this.maybeEmitCypressInCypress('mocha', 'test end', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'test end', ...args) } @@ -472,6 +503,8 @@ class $Cypress { // mocha runner calculated a pass // this is delayed from when mocha would normally fire it // since we fire it after all afterEach hooks have ran + this.maybeEmitCypressInCypress('mocha', 'pass', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'pass', ...args) } @@ -480,6 +513,8 @@ class $Cypress { case 'runner:pending': // mocha runner calculated a pending test + this.maybeEmitCypressInCypress('mocha', 'pending', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'pending', ...args) } @@ -487,6 +522,8 @@ class $Cypress { break case 'runner:fail': { + this.maybeEmitCypressInCypress('mocha', 'fail', ...args) + if (this.config('isTextTerminal')) { return this.emit('mocha', 'fail', ...args) } @@ -497,6 +534,8 @@ class $Cypress { // https://github.com/mochajs/mocha/commit/2a76dd7589e4a1ed14dd2a33ab89f182e4c4a050 case 'runner:retry': { // mocha runner calculated a pass + this.maybeEmitCypressInCypress('mocha', 'retry', ...args) + if (this.config('isTextTerminal')) { this.emit('mocha', 'retry', ...args) } @@ -508,6 +547,8 @@ class $Cypress { return this.runner.onRunnableRun(...args) case 'runner:test:before:run': + this.maybeEmitCypressInCypress('mocha', 'test:before:run', args[0]) + if (this.config('isTextTerminal')) { // needed for handling test retries this.emit('mocha', 'test:before:run', args[0]) @@ -529,6 +570,7 @@ class $Cypress { // this event is how the reporter knows how to display // stats and runnable properties such as errors this.emit('test:after:run', ...args) + this.maybeEmitCypressInCypress('mocha', 'test:after:run', args[0]) if (this.config('isTextTerminal')) { // needed for calculating wallClockDuration diff --git a/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts b/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts index 5f6ff0ed7d..af13055d7b 100644 --- a/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts +++ b/packages/frontend-shared/cypress/e2e/support/e2eProjectDirs.ts @@ -158,6 +158,7 @@ export const e2eProjectDirs = [ 'vueclivue3-configured', 'vueclivue3-custom-index-html', 'vueclivue3-unconfigured', + 'webpack-dev-server', 'webpack-preprocessor', 'webpack-preprocessor-awesome-typescript-loader', 'webpack-preprocessor-ts-loader', diff --git a/packages/runner/__snapshots__/runner.mochaEvents.cy.js b/packages/runner/__snapshots__/runner.mochaEvents.cy.js index 0fc314f77c..d1bb34155a 100644 --- a/packages/runner/__snapshots__/runner.mochaEvents.cy.js +++ b/packages/runner/__snapshots__/runner.mochaEvents.cy.js @@ -1,2093 +1,3 @@ -exports['src/cypress/runner tests finish with correct state hook failures fail in [before] #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "suite", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"before all\" hook", - "hookName": "before all", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "fail", - { - "id": "r3", - "title": "\"before all\" hook for \"test 1\"", - "hookName": "before all", - "hookId": "h1", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "originalTitle": "\"before all\" hook", - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - }, - { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - } - ], - [ - "mocha", - "suite end", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "hookName": "before all", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "failedFromHookId": "h1", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "hookName": "before all", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "failedFromHookId": "h1", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] - -exports['src/cypress/runner tests finish with correct state hook failures fail in [beforeEach] #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "suite", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "fail", - { - "id": "r3", - "title": "\"before each\" hook for \"test 1\"", - "hookName": "before each", - "hookId": "h1", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "originalTitle": "\"before each\" hook", - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - }, - { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "hookName": "before each", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "failedFromHookId": "h1", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before each": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "hookName": "before each", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "failedFromHookId": "h1", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "before each": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] - -exports['src/cypress/runner tests finish with correct state hook failures fail in [afterEach] #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "suite", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "fail", - { - "id": "r3", - "title": "\"after each\" hook for \"test 1\"", - "hookName": "after each", - "hookId": "h1", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "originalTitle": "\"after each\" hook", - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - }, - { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "hookName": "after each", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "failedFromHookId": "h1", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "hookName": "after each", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "failedFromHookId": "h1", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] - -exports['src/cypress/runner tests finish with correct state hook failures fail in [after] #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "suite", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "pass", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "body": "[body]", - "type": "test", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r4", - "title": "\"after all\" hook", - "hookName": "after all", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "fail", - { - "id": "r4", - "title": "\"after all\" hook for \"test 2\"", - "hookName": "after all", - "hookId": "h1", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "originalTitle": "\"after all\" hook", - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - }, - { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "hookName": "after all", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "failedFromHookId": "h1", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "hookName": "after all", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "failedFromHookId": "h1", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] - -exports['src/cypress/runner tests finish with correct state mocha grep fail with [only] #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "suite", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"before all\" hook", - "hookName": "before all", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"before all\" hook", - "hookName": "before all", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "fail", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - }, - { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"after all\" hook", - "hookName": "after all", - "hookId": "h3", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"after all\" hook", - "hookName": "after all", - "hookId": "h3", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "err": { - "message": "[error message]", - "name": "AssertionError", - "stack": "match.string", - "sourceMappedStack": "match.string", - "parsedStack": "match.array" - }, - "state": "failed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] - -exports['src/cypress/runner tests finish with correct state mocha grep pass with [only] #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "suite", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"before all\" hook", - "hookName": "before all", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"before all\" hook", - "hookName": "before all", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"after all\" hook", - "hookName": "after all", - "hookId": "h3", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"after all\" hook", - "hookName": "after all", - "hookId": "h3", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "pass", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 2", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] - exports['serialize state - hooks'] = { "currentId": "r6", "tests": "{Object 2}", @@ -2143,1166 +53,3 @@ exports['src/cypress/runner other specs screenshots screenshot after failed test } ] ] - -exports['src/cypress/runner mocha events simple single test #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "suite", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "pass", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] - -exports['src/cypress/runner mocha events simple three tests #1'] = [ - [ - "mocha", - "start", - { - "start": "match.date" - } - ], - [ - "mocha", - "suite", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "suite", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"before all\" hook", - "hookName": "before all", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"before all\" hook", - "hookName": "before all", - "hookId": "h1", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r3", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r3", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "pass", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r3", - "order": 1, - "title": "test 1", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "before all": [ - { - "hookId": "h1", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "body": "[body]", - "type": "test", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r4", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r4", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r4", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r4", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "pass", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r4", - "order": 2, - "title": "test 2", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r5", - "order": 3, - "title": "test 3", - "body": "[body]", - "type": "test", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r5", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:before:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r5", - "order": 3, - "title": "test 3", - "body": "[body]", - "type": "test", - "wallClockStartedAt": "match.date", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r5", - "title": "\"before each\" hook", - "hookName": "before each", - "hookId": "h2", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r5", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r5", - "title": "\"after each\" hook", - "hookName": "after each", - "hookId": "h4", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook", - { - "id": "r5", - "title": "\"after all\" hook", - "hookName": "after all", - "hookId": "h3", - "body": "[body]", - "type": "hook", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "hook end", - { - "id": "r5", - "title": "\"after all\" hook", - "hookName": "after all", - "hookId": "h3", - "body": "[body]", - "type": "hook", - "duration": "match.number", - "file": null, - "invocationDetails": "{Object 9}", - "currentRetry": 0, - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "pass", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r5", - "order": 3, - "title": "test 3", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "test end", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r5", - "order": 3, - "title": "test 3", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "timings": { - "lifecycle": "match.number", - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r2", - "title": "suite 1", - "root": false, - "type": "suite", - "file": null, - "invocationDetails": "{Object 9}", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "test:after:run", - { - "_testConfig": { - "testConfigList": [], - "unverifiedTestConfig": {} - }, - "id": "r5", - "order": 3, - "title": "test 3", - "state": "passed", - "body": "[body]", - "type": "test", - "duration": "match.number", - "wallClockStartedAt": "match.date", - "wallClockDuration": "match.number", - "timings": { - "lifecycle": "match.number", - "before each": [ - { - "hookId": "h2", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "test": { - "fnDuration": "match.number", - "afterFnDuration": "match.number" - }, - "after each": [ - { - "hookId": "h4", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ], - "after all": [ - { - "hookId": "h3", - "fnDuration": "match.number", - "afterFnDuration": "match.number" - } - ] - }, - "file": null, - "invocationDetails": "{Object 9}", - "final": true, - "currentRetry": 0, - "retries": 0, - "_slow": 10000 - } - ], - [ - "mocha", - "suite end", - { - "id": "r1", - "title": "", - "root": true, - "type": "suite", - "file": "relative/path/to/spec.js", - "retries": -1, - "_slow": 10000 - } - ], - [ - "mocha", - "end", - { - "end": "match.date" - } - ] -] diff --git a/packages/runner/cypress/e2e/retries.mochaEvents.cy.js b/packages/runner/cypress/e2e/retries.mochaEvents.cy.js index 18b3af745b..97acc6d632 100644 --- a/packages/runner/cypress/e2e/retries.mochaEvents.cy.js +++ b/packages/runner/cypress/e2e/retries.mochaEvents.cy.js @@ -1,23 +1,10 @@ const helpers = require('../support/helpers') const { shouldHaveTestResults, getRunState, cleanseRunStateMap } = helpers -const { runIsolatedCypress, snapshotMochaEvents, getAutCypress } = helpers.createCypress({ config: { retries: 2, isTextTerminal: true } }) +const { runIsolatedCypress, getAutCypress } = helpers.createCypress({ config: { retries: 2, isTextTerminal: true } }) const { sinon } = Cypress const match = Cypress.sinon.match -const threeTestsWithRetry = { - suites: { - 'suite 1': { - hooks: ['before', 'beforeEach', 'afterEach', 'after'], - tests: [ - 'test 1', - { name: 'test 2', fail: 2 }, - 'test 3', - ], - }, - }, -} - describe('src/cypress/runner retries mochaEvents', { retries: 0 }, () => { // NOTE: for test-retries it('can set retry config', () => { @@ -27,142 +14,6 @@ describe('src/cypress/runner retries mochaEvents', { retries: 0 }, () => { }) }) - it('simple retry', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - tests: [ - { name: 'test 1', - fail: 1, - }, - ], - }, - }, - }, { config: { retries: 1 } }) - .then(snapshotMochaEvents) - }) - - it('test retry with hooks', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: ['before', 'beforeEach', 'afterEach', 'after'], - tests: [{ name: 'test 1', fail: 1 }], - }, - }, - }, { config: { retries: 1 } }) - .then(snapshotMochaEvents) - }) - - it('test retry with [only]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: ['before', 'beforeEach', 'afterEach', 'after'], - tests: [ - { name: 'test 1' }, - { name: 'test 2', fail: 1, only: true }, - { name: 'test 3' }, - ], - }, - }, - }, { config: { retries: 1 } }) - .then(snapshotMochaEvents) - }) - - it('can retry from [beforeEach]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: [ - 'before', - 'beforeEach', - { type: 'beforeEach', fail: 1 }, - 'beforeEach', - 'afterEach', - 'after', - ], - tests: [{ name: 'test 1' }], - }, - }, - }, { config: { retries: 1 } }) - .then(snapshotMochaEvents) - }) - - it('can retry from [afterEach]', () => { - runIsolatedCypress({ - hooks: [{ type: 'afterEach', fail: 1 }], - suites: { - 'suite 1': { - hooks: [ - 'before', - 'beforeEach', - 'beforeEach', - 'afterEach', - 'after', - ], - tests: [{ name: 'test 1' }, 'test 2', 'test 3'], - }, - 'suite 2': { - hooks: [{ type: 'afterEach', fail: 2 }], - tests: ['test 1'], - }, - 'suite 3': { - tests: ['test 1'], - }, - }, - }, { config: { retries: 2, isTextTerminal: true } }) - - .then(snapshotMochaEvents) - }) - - it('cant retry from [before]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: [ - { type: 'before', fail: 1 }, - 'beforeEach', - 'beforeEach', - 'afterEach', - 'afterEach', - 'after', - ], - tests: [{ name: 'test 1' }], - }, - }, - }, { config: { retries: 1 } }) - .then(snapshotMochaEvents) - }) - - it('cant retry from [after]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: [ - 'before', - 'beforeEach', - 'beforeEach', - 'afterEach', - 'afterEach', - { type: 'after', fail: 1 }, - ], - tests: [{ name: 'test 1' }], - }, - }, - }, { config: { retries: 1 } }) - .then(snapshotMochaEvents) - }) - - it('three tests with retry', () => { - runIsolatedCypress(threeTestsWithRetry, { - config: { - retries: 2, - }, - }) - .then(snapshotMochaEvents) - }) - describe('screenshots', () => { it('retry screenshot in test body', () => { let onAfterScreenshot @@ -249,20 +100,6 @@ describe('src/cypress/runner retries mochaEvents', { retries: 0 }, () => { }) }) - // https://github.com/cypress-io/cypress/issues/8363 - describe('cleanses errors before emitting', () => { - it('does not try to serialize error with err.actual as DOM node', () => { - runIsolatedCypress(() => { - it('visits', () => { - cy.visit('/fixtures/dom.html') - cy.get('#button').should('not.be.visible') - }) - }, { config: { defaultCommandTimeout: 200 } }) - // should not have err.actual, expected properties since the subject is a DOM element - .then(snapshotMochaEvents) - }) - }) - describe('save/reload state', () => { const serializeState = () => { return getRunState(getAutCypress()) diff --git a/packages/runner/cypress/e2e/runner.mochaEvents.cy.js b/packages/runner/cypress/e2e/runner.mochaEvents.cy.js index d176d7cdc2..233257ef40 100644 --- a/packages/runner/cypress/e2e/runner.mochaEvents.cy.js +++ b/packages/runner/cypress/e2e/runner.mochaEvents.cy.js @@ -3,148 +3,9 @@ const sinon = require('sinon') const helpers = require('../support/helpers') const { cleanseRunStateMap, shouldHaveTestResults, getRunState } = helpers -const { runIsolatedCypress, snapshotMochaEvents, getAutCypress } = helpers.createCypress({ config: { isTextTerminal: true, retries: 0 } }) - -const simpleSingleTest = { - suites: { 'suite 1': { tests: [{ name: 'test 1' }] } }, -} - -const threeTestsWithHooks = { - suites: { 'suite 1': { hooks: ['before', 'beforeEach', 'afterEach', 'after'], tests: ['test 1', 'test 2', 'test 3'] } }, -} +const { runIsolatedCypress, getAutCypress } = helpers.createCypress({ config: { isTextTerminal: true, retries: 0 } }) describe('src/cypress/runner', { retries: 0 }, () => { - describe('tests finish with correct state', () => { - describe('hook failures', () => { - it('fail in [before]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: [ - { - type: 'before', - fail: true, - }, - ], - tests: [{ name: 'test 1' }], - }, - }, - }) - .then(shouldHaveTestResults(0, 1)) - .then(() => { - cy.get('.runnable-err:visible').invoke('text').should('contain', 'Because this error occurred during a before all hook') - }) - .then(() => { - snapshotMochaEvents() - }) - }) - - it('fail in [beforeEach]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: [ - { - type: 'beforeEach', - fail: true, - }, - ], - tests: [{ name: 'test 1' }], - }, - }, - }) - .then(shouldHaveTestResults(0, 1)) - .then(() => { - snapshotMochaEvents() - }) - }) - - it('fail in [afterEach]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: [ - { - type: 'afterEach', - fail: true, - }, - ], - tests: [{ name: 'test 1' }], - }, - }, - }) - .then(shouldHaveTestResults(0, 1)) - .then(() => { - snapshotMochaEvents() - }) - }) - - it('fail in [after]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: [ - { - type: 'after', - fail: true, - }, - ], - tests: ['test 1', 'test 2'], - }, - }, - }) - .then(shouldHaveTestResults(1, 1)) - .then(() => { - expect('foo').contain('f') - cy.get('.runnable-err:visible').invoke('text').should('contain', 'Because this error occurred during a after all hook') - }) - .then(() => { - snapshotMochaEvents() - }) - }) - }) - - describe('mocha grep', () => { - it('fail with [only]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: ['before', 'beforeEach', 'afterEach', 'after'], - tests: [ - { name: 'test 1', fail: true }, - { name: 'test 2', fail: true, only: true }, - { name: 'test 3', fail: true }, - ], - }, - }, - }) - .then(shouldHaveTestResults(0, 1)) - .then(() => { - snapshotMochaEvents() - }) - }) - - it('pass with [only]', () => { - runIsolatedCypress({ - suites: { - 'suite 1': { - hooks: ['before', 'beforeEach', 'afterEach', 'after'], - tests: [ - { name: 'test 1' }, - { name: 'test 2', only: true }, - { name: 'test 3' }, - ], - }, - }, - }) - .then(shouldHaveTestResults(1, 0)) - .then(() => { - snapshotMochaEvents() - }) - }) - }) - }) - describe('save/reload state on top navigation', () => { describe('serialize / load from state', () => { const serializeState = () => { @@ -291,22 +152,6 @@ describe('src/cypress/runner', { retries: 0 }, () => { }) }) - describe('mocha events', () => { - it('simple single test', () => { - runIsolatedCypress(simpleSingleTest) - .then(() => { - snapshotMochaEvents() - }) - }) - - it('simple three tests', () => { - runIsolatedCypress(threeTestsWithHooks) - .then(() => { - snapshotMochaEvents() - }) - }) - }) - describe('event listeners', () => { // https://github.com/cypress-io/cypress/issues/8701 it('does not hang when error thrown in test:after:run', () => { diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/can-retry-from-afterEach.retries.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/can-retry-from-afterEach.retries.mochaEvents.cy.js new file mode 100644 index 0000000000..b86a87927c --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/can-retry-from-afterEach.retries.mochaEvents.cy.js @@ -0,0 +1,37 @@ +let i = 0 + +afterEach(() => { + if (i === 0) { + i++ + throw new Error('') + } +}) + +describe('suite 1', { retries: 2 }, () => { + before(() => {}) + beforeEach(() => {}) + beforeEach(() => {}) + afterEach(() => {}) + after(() => {}) + + it('test 1', () => {}) + it('test 2', () => {}) + it('test 3', () => {}) +}) + +describe('suite 2', { retries: 2 }, () => { + let j = 0 + + afterEach(() => { + if (j === 0 || j === 1) { + j++ + throw new Error('') + } + }) + + it('test 1', () => {}) +}) + +describe('suite 3', { retries: 2 }, () => { + it('test 1', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/can-retry-from-beforeEach.retries.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/can-retry-from-beforeEach.retries.mochaEvents.cy.js new file mode 100644 index 0000000000..46d32aaa3c --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/can-retry-from-beforeEach.retries.mochaEvents.cy.js @@ -0,0 +1,20 @@ +describe('suite 1', { retries: 1 }, () => { + before(() => {}) + beforeEach(() => {}) + + let i = 0 + + beforeEach(() => { + if (i === 0) { + i++ + throw new Error('') + } + }) + + beforeEach(() => {}) + + afterEach(() => {}) + after(() => {}) + + it('test 1', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/cant-retry-from-after.retries.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/cant-retry-from-after.retries.mochaEvents.cy.js new file mode 100644 index 0000000000..b65cfa4279 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/cant-retry-from-after.retries.mochaEvents.cy.js @@ -0,0 +1,17 @@ +describe('suite 1', { retries: 1 }, () => { + before(() => {}) + beforeEach(() => {}) + beforeEach(() => {}) + afterEach(() => {}) + afterEach(() => {}) + let i = 0 + + after(() => { + if (i === 0) { + i++ + throw new Error('') + } + }) + + it('test 1', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/cant-retry-from-before.retries.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/cant-retry-from-before.retries.mochaEvents.cy.js new file mode 100644 index 0000000000..8555ac63b1 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/cant-retry-from-before.retries.mochaEvents.cy.js @@ -0,0 +1,17 @@ +describe('suite 1', { retries: 1 }, () => { + let i = 0 + + before(() => { + if (i === 0) { + i++ + throw new Error('') + } + }) + + beforeEach(() => {}) + beforeEach(() => {}) + afterEach(() => {}) + afterEach(() => {}) + after(() => {}) + it('test 1', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/does-not-serialize-dom-error.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/does-not-serialize-dom-error.cy.js new file mode 100644 index 0000000000..0a42df37ef --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/does-not-serialize-dom-error.cy.js @@ -0,0 +1,4 @@ +it('visits', { defaultCommandTimeout: 200, retries: 2 }, () => { + cy.visit('cypress/fixtures/dom.html') + cy.get('#button').should('not.be.visible') +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-after.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-after.mochaEvents.cy.js new file mode 100644 index 0000000000..41e1bfe4e1 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-after.mochaEvents.cy.js @@ -0,0 +1,8 @@ +describe('suite 1', () => { + after(() => { + throw new Error('Error!') + }) + + it('test 1', () => {}) + it('test 2', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-afterEach.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-afterEach.mochaEvents.cy.js new file mode 100644 index 0000000000..6800a6f8b1 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-afterEach.mochaEvents.cy.js @@ -0,0 +1,7 @@ +describe('suite 1', () => { + afterEach(() => { + throw new Error('After each error') + }) + + it('test 1', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-before.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-before.mochaEvents.cy.js new file mode 100644 index 0000000000..fe1bb7a5a5 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-before.mochaEvents.cy.js @@ -0,0 +1,7 @@ +describe('suite 1', () => { + before(() => { + throw new Error('before') + }) + + it('test 1', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-beforeEach.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-beforeEach.mochaEvents.cy.js new file mode 100644 index 0000000000..9851813199 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-beforeEach.mochaEvents.cy.js @@ -0,0 +1,7 @@ +describe('suite 1', () => { + beforeEach(() => { + throw new Error('beforeEach') + }) + + it('test 1', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-only.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-only.mochaEvents.cy.js new file mode 100644 index 0000000000..c7d86bf57a --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/fail-with-only.mochaEvents.cy.js @@ -0,0 +1,19 @@ +describe('suite 1', () => { + before(() => {}) + beforeEach(() => {}) + after(() => {}) + afterEach(() => {}) + + it('test 1', () => { + throw new Error('T1 fail') + }) + + // eslint-disable-next-line mocha/no-exclusive-tests + it.only('test 2', () => { + throw new Error('T2 fail') + }) + + it('test 3', () => { + throw new Error('T3 fail') + }) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/pass-with-only.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/pass-with-only.mochaEvents.cy.js new file mode 100644 index 0000000000..4fa92d5fa9 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/pass-with-only.mochaEvents.cy.js @@ -0,0 +1,11 @@ +describe('suite 1', () => { + before(() => {}) + beforeEach(() => {}) + after(() => {}) + afterEach(() => {}) + + it('test 1', () => {}) + // eslint-disable-next-line mocha/no-exclusive-tests + it.only('test 2', () => {}) + it('test 3', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/simple-fail.retries.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/simple-fail.retries.mochaEvents.cy.js new file mode 100644 index 0000000000..6cc75f976b --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/simple-fail.retries.mochaEvents.cy.js @@ -0,0 +1,10 @@ +describe('suite 1', { retries: 1 }, () => { + let i = 0 + + it('test 1', () => { + if (i === 0) { + i++ + throw new Error('test 1') + } + }) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/simple-single-test.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/simple-single-test.mochaEvents.cy.js new file mode 100644 index 0000000000..1e9a22f2c8 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/simple-single-test.mochaEvents.cy.js @@ -0,0 +1,3 @@ +describe('suite 1', () => { + it('test 1', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/test-retry-with-hooks.retries.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/test-retry-with-hooks.retries.mochaEvents.cy.js new file mode 100644 index 0000000000..400d20a142 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/test-retry-with-hooks.retries.mochaEvents.cy.js @@ -0,0 +1,15 @@ +describe('suite 1', { retries: 1 }, () => { + before(() => {}) + beforeEach(() => {}) + after(() => {}) + afterEach(() => {}) + + let i = 0 + + it('test 1', () => { + if (i === 0) { + i++ + throw new Error('test 1') + } + }) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/test-retry-with-only.retries.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/test-retry-with-only.retries.mochaEvents.cy.js new file mode 100644 index 0000000000..ed1da8067a --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/test-retry-with-only.retries.mochaEvents.cy.js @@ -0,0 +1,20 @@ +describe('suite 1', { retries: 1 }, () => { + before(() => {}) + beforeEach(() => {}) + after(() => {}) + afterEach(() => {}) + + it('test 1', () => {}) + + let i = 0 + + // eslint-disable-next-line mocha/no-exclusive-tests + it.only('test 2', () => { + if (i === 0) { + i++ + throw new Error('test 2') + } + }) + + it('test 3', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/three-tests-with-hooks.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/three-tests-with-hooks.mochaEvents.cy.js new file mode 100644 index 0000000000..efa27e0b0e --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/three-tests-with-hooks.mochaEvents.cy.js @@ -0,0 +1,10 @@ +describe('suite 1', () => { + before(() => {}) + beforeEach(() => {}) + after(() => {}) + afterEach(() => {}) + + it('test 1', () => {}) + it('test 2', () => {}) + it('test 3', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/three-tests-with-retry.retries.mochaEvents.cy.js b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/three-tests-with-retry.retries.mochaEvents.cy.js new file mode 100644 index 0000000000..c86b19501c --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/e2e/runner/three-tests-with-retry.retries.mochaEvents.cy.js @@ -0,0 +1,19 @@ +describe('suite 1', { retries: 2 }, () => { + before(() => {}) + beforeEach(() => {}) + afterEach(() => {}) + after(() => {}) + + it('test 1', () => {}) + + let i = 0 + + it('test 2', () => { + if (i <= 1) { + i++ + throw new Error('') + } + }) + + it('test 3', () => {}) +}) diff --git a/system-tests/projects/runner-e2e-specs/cypress/fixtures/dom.html b/system-tests/projects/runner-e2e-specs/cypress/fixtures/dom.html new file mode 100644 index 0000000000..762e7fa1a1 --- /dev/null +++ b/system-tests/projects/runner-e2e-specs/cypress/fixtures/dom.html @@ -0,0 +1,675 @@ + + + + DOM Fixture + + +
+ + + DOM Fixture + +
+ Nested Find +
+ +
+
+ +
+ foo +
+ foo +
+
+ +
+
5
+
1
+
2
+
3
+
4
+ + + 1 + + + + 2 + + + + 3 + + + 25 + + 25 +
+ +
+ +
+ +
+
+
New York
+
+
+
New York
+
+
+ +
    +
  • li 0
  • +
  • li 1
  • +
  • li 2
  • +
+ +
    +
  • asdf 1
  • +
  • asdf 2
  • +
  • asdf 3
  • +
+ +
    +
  • jkl 1
  • +
  • jkl 2
  • +
  • jkl 3
  • +
+ +
    +
  • jkl 4
  • +
  • jkl 5
  • +
  • jkl 6
  • +
+ +
+ el with tabindex +
+ + + +
+ + + +
+ +
+ + + + + + + + + + + + +
+ +
+ +
+ +
+ + +
+ + + +
+ + + +
+ +
+ +
+ +
+ + + click me 1 + + + +
+ +
+ +
+ +
+ + click button 1 + + +
+ +
+ + Home Page + +
+ +
+
+ + + + +
+
+ +
+
+
+ +
+
+ +
+ + +
+ + +
+ + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + + +
+ +
+ + + + +
+ +
+ + + +
+ +
+ + + + + +
+ +
+ + + + +
+ +
+ + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + +
+ + + + header + + + + + + +
cell
+ +
+ 1 + 2 + 3 + 4 + 5 +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ content should be editable +
+ + + + + +
+ + + + + + + + + +
+ + + +
+
    +
  • +
    + + +
    + Assessments +
    +
    + 1 Folder Type +
    +
    +
    +
      +
    • +
      + + + Inspection + +
      +
    • +
    +
  • +
  • +
    + + +
    + Folders +
    +
    + 2 Folder Types +
    +
    +
    +
      +
    • +
      + + + Maintenance + +
      +
    • +
    • +
      + + + Quality Control + +
      +
    • +
    +
  • +
+
+ custom element +
+ +
+ my hidden content +
+ + + +
+
    +
  • foo
  • +
  • bar
  • +
  • baz
  • +
  • quux
  • +
+ + + + + + opacity 0 + +
+ parent opacity 0 +
+
+ opacity 0 +
+ +
+
+
+ +
+
+
+ Sakura + Naruto + + +
+
+ iframe:
+ +
+
Text
+
+ +
+
+ Cross domain iframe:
+ +
+
+ + diff --git a/yarn.lock b/yarn.lock index 70b4aa49f6..1727494e23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12212,7 +12212,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0, ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.2.1: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -19311,6 +19311,14 @@ disparity@3.0.0: ansi-styles "^4.1.0" diff "^4.0.1" +disparity@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/disparity/-/disparity-3.2.0.tgz#7198eaf7a873a130f8098c93061c1df8934500f2" + integrity sha512-8cl9ouncFYE7OQsYwJNiy2e15S0xN80X1Jj/N/YkoiM+VGWSyg1YzPToecKyYx2DQiJapt5IC8yi43GW23TUHQ== + dependencies: + ansi-styles "^4.2.1" + diff "^4.0.2" + dmg-builder@22.13.1: version "22.13.1" resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-22.13.1.tgz#5a77655e691ad7e5d28fbf008c68e819e0e2bd69"