Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Nov 7, 2023
2 parents 00d385b + 905390b commit d063310
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 11 deletions.
80 changes: 71 additions & 9 deletions docs/internal-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,78 @@ module.exports = function() {
FAIL | 7 passed, 1 failed, 1 skipped // 2s
2s
{
suites: [...],
tests: {
passed: [...],
failed: [...],
skipped: [...],
},
steps: {
passed: [...],
failed: [...],
"tests": {
"passed": [
{
"type": "test",
"title": "Assert @C3",
"body": "() => { }",
"async": 0,
"sync": true,
"_timeout": 2000,
"_slow": 75,
"_retries": -1,
"timedOut": false,
"_currentRetry": 0,
"pending": false,
"opts": {},
"tags": [
"@C3"
],
"uid": "xe4q1HdqpRrZG5dPe0JG+A",
"workerIndex": 3,
"retries": -1,
"duration": 493,
"err": null,
"parent": {
"title": "My",
"ctx": {},
"suites": [],
"tests": [],
"root": false,
"pending": false,
"_retries": -1,
"_beforeEach": [],
"_beforeAll": [],
"_afterEach": [],
"_afterAll": [],
"_timeout": 2000,
"_slow": 75,
"_bail": false,
"_onlyTests": [],
"_onlySuites": [],
"delayed": false
},
"steps": [
{
"actor": "I",
"name": "amOnPage",
"status": "success",
"agrs": [
"https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST"
],
"startedAt": 1698760652610,
"startTime": 1698760652611,
"endTime": 1698760653098,
"finishedAt": 1698760653098,
"duration": 488
},
{
"actor": "I",
"name": "grabCurrentUrl",
"status": "success",
"agrs": [],
"startedAt": 1698760653098,
"startTime": 1698760653098,
"endTime": 1698760653099,
"finishedAt": 1698760653099,
"duration": 1
}
]
}
],
"failed": [],
"skipped": []
}
```
Expand Down
5 changes: 3 additions & 2 deletions lib/command/workers/runTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ function initializeListeners() {
duration: test.duration || 0,
err,
parent,
steps: test.steps ? simplifyStepsInTestObject(test.steps) : [],
steps: test.steps ? simplifyStepsInTestObject(test.steps, err) : [],
};
}

function simplifyStepsInTestObject(steps) {
function simplifyStepsInTestObject(steps, err) {
steps = [...steps];
const _steps = [];

Expand All @@ -151,6 +151,7 @@ function initializeListeners() {
endTime: step.endTime,
finishedAt: step.finishedAt,
duration: step.duration,
err,
});
}

Expand Down

0 comments on commit d063310

Please sign in to comment.