Skip to content

Commit

Permalink
EPMRPP-8583 || fix issue with webdriverio + mocha in it.skip
Browse files Browse the repository at this point in the history
- Add prettierignore
- Bump client js version
- Update GH token
  • Loading branch information
Dzmitry Kosarau authored and Dzmitry Kosarau committed Oct 13, 2023
1 parent 2778f5f commit b65ea2a
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
npm config list
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore all .md files
*.md
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Fixed
- Reporter breaks on skipped test for WebdriverIO + Mocha - [#46](https://github.com/reportportal/agent-js-webdriverio/issues/46)
### Updated
- `@reportportal/client-javascript` bumped to version `5.0.14`
### Added
- Browser parameter to steps

Expand Down
51 changes: 27 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test:coverage": "jest --coverage"
},
"dependencies": {
"@reportportal/client-javascript": "^5.0.8",
"@reportportal/client-javascript": "^5.0.14",
"@wdio/reporter": "^7.29.1",
"json-stringify-safe": "^5.0.1"
},
Expand Down
3 changes: 3 additions & 0 deletions src/__tests__/finishTest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ describe('finishing test reporting', () => {
title: testName,
state: 'skipped',
};
reporter.onTestStart = jest.fn();

reporter.onTestSkip(testStats);

expect(reporter.onTestStart).toHaveBeenCalledTimes(1);
expect(reporter.onTestStart).toHaveBeenCalledWith(testStats);
expect(spyOnFinishTest).toBeCalledTimes(1);
expect(spyOnFinishTest).toBeCalledWith(testStats);
});
Expand Down
1 change: 1 addition & 0 deletions src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export class Reporter extends WDIOReporter {
}

onTestSkip(testStats: TestStats): void {
this.onTestStart(testStats);
this.finishTest(testStats);
}

Expand Down

0 comments on commit b65ea2a

Please sign in to comment.