Skip to content

Commit 1b9f40f

Browse files
authored
Merge pull request #54 from reportportal/develop
Release 5.0.2
2 parents 45f87ea + 4fc832f commit 1b9f40f

File tree

10 files changed

+67
-74
lines changed

10 files changed

+67
-74
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: publish
22

33
on:
4-
release:
5-
types:
6-
- published
4+
repository_dispatch:
5+
types: [version-released]
76

87
jobs:
98
build:

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,9 @@ jobs:
128128
body: ${{ needs.create-tag.outputs.versionInfo }}
129129
draft: false
130130
prerelease: false
131+
- name: Trigger the publish workflow
132+
if: success()
133+
uses: peter-evans/repository-dispatch@v1
134+
with:
135+
token: ${{ secrets.GH_TOKEN }}
136+
event-type: version-released

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### Added
2+
- Debug flag, launch mode configuration properties
3+
4+
### Fixed
5+
- Doesn't start a suite if test has no describe
6+
- Vulnerable dependencies (lodash)
17

28
## [5.0.1] - 2020-06-12
39
### Changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# reportportal-agent-jest
1+
# @reportportal/agent-js-jest
22

33
A Jest reporter that uploads the results to a [ReportPortal](http://reportportal.io/) server.
44

@@ -50,7 +50,7 @@ module.exports = {
5050
[
5151
"@reportportal/agent-js-jest",
5252
{
53-
"token": "00000000-0000-0000-0000-000000000000",
53+
"token": "00000000-0000-0000-0000-000000000000",
5454
"endpoint": "https://your.reportportal.server/api/v1",
5555
"project": "YourReportPortalProjectName",
5656
"launch": "YourLauncherName",
@@ -108,12 +108,30 @@ Example:
108108
"skippedIssue": false
109109
```
110110
111+
## Launch mode:
112+
Launch mode. Allowable values *DEFAULT* (by default) or *DEBUG*.
113+
114+
Example:
115+
116+
```json
117+
"mode": "DEBUG"
118+
```
119+
120+
## Debug flag:
121+
This flag allows seeing the logs of the client-javascript. Useful for debugging an agent.
122+
123+
Example:
124+
125+
```json
126+
"debug": true
127+
```
128+
111129
# Copyright Notice
112130
113131
Licensed under the [Apache License v2.0](LICENSE)
114132
115133
# Contribution
116134
This code was based on the [jest-junit](https://github.com/jest-community/jest-junit)
117-
and adapted by team members of [Ontoforce](https://www.ontoforce.com) for the
135+
and adapted by team members of [Ontoforce](https://www.ontoforce.com) for the
118136
ReportPortal upload. Ontoforce contributed this effort as Open Source to the
119137
ReportPortal project team.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.1
1+
5.0.2-SNAPSHOT

__tests__/objectUtils.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,16 @@ describe('Object Utils script', () => {
168168
{ key: null, value: 'attributesOne' },
169169
{ key: 'attributesTwoKey', value: 'attributesTwoValue' },
170170
],
171+
mode: 'DEBUG',
172+
debug: true,
171173
};
172174
const options = {
173175
endpoint: 'endpoint',
174176
rerun: true,
175177
rerunOf: '00000000-0000-0000-0000-000000000000',
176178
description: 'description',
179+
mode: 'DEBUG',
180+
debug: true,
177181
};
178182

179183
const clientInitObject = getClientInitObject(options);

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class JestReportPortal {
8787
}
8888

8989
_startSuite(suiteName, path) {
90+
if (!suiteName) return;
91+
9092
const codeRef = getCodeRef(path, suiteName);
9193
const { tempId, promise } = this.client.startTestItem(getSuiteStartObject(suiteName, codeRef),
9294
this.tempLaunchId);
@@ -166,6 +168,8 @@ class JestReportPortal {
166168
}
167169

168170
_finishSuite() {
171+
if (!this.tempSuiteId) return;
172+
169173
const { promise } = this.client.finishTestItem(this.tempSuiteId, {});
170174

171175
promiseErrorHandler(promise);

package-lock.json

Lines changed: 19 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"dependencies": {
3939
"@jest/reporters": "25.1.0",
4040
"jest-cli": "^25.1.0",
41-
"@reportportal/client-javascript": "^5.0.0"
41+
"@reportportal/client-javascript": "^5.0.2"
4242
},
4343
"devDependencies": {
4444
"@types/jest": "^24.9.0",

utils/objectUtils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const getStartLaunchObject = (options = {}) => {
3131
attributes: options.attributes ? options.attributes.concat(systemAttr) : systemAttr,
3232
rerun: options.rerun,
3333
rerunOf: options.rerunOf,
34+
mode: options.mode,
3435
skippedIssue: options.skippedIssue,
3536
startTime: new Date().valueOf(),
3637
};
@@ -73,6 +74,8 @@ const getClientInitObject = (options = {}) => {
7374
skippedIssue: options.skippedIssue,
7475
description: options.description,
7576
attributes: env_attributes || options.attributes,
77+
mode: options.mode,
78+
debug: options.debug,
7679
};
7780
};
7881

0 commit comments

Comments
 (0)