Skip to content

Commit

Permalink
Fix linter execution
Browse files Browse the repository at this point in the history
  • Loading branch information
AmsterGet committed Sep 17, 2024
1 parent 877ad4b commit fc1e2da
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
build
spec/**/*.json
__tests__/**/*.json
40 changes: 17 additions & 23 deletions __tests__/report-portal-client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,11 @@ describe('ReportPortal javascript client', () => {
startTime: time,
});

expect(client.restClient.create).toHaveBeenCalledWith(
'launch',
{
name: 'Test launch name',
startTime: time,
attributes: fakeSystemAttr,
}
);
expect(client.restClient.create).toHaveBeenCalledWith('launch', {
name: 'Test launch name',
startTime: time,
attributes: fakeSystemAttr,
});
});

it('should call restClient with suitable parameters, attributes is concatenated', () => {
Expand All @@ -282,21 +279,18 @@ describe('ReportPortal javascript client', () => {
attributes: [{ value: 'value' }],
});

expect(client.restClient.create).toHaveBeenCalledWith(
'launch',
{
name: 'Test launch name',
startTime: time,
attributes: [
{ value: 'value' },
{
key: 'client',
value: 'client-name|1.0',
system: true,
},
],
}
);
expect(client.restClient.create).toHaveBeenCalledWith('launch', {
name: 'Test launch name',
startTime: time,
attributes: [
{ value: 'value' },
{
key: 'client',
value: 'client-name|1.0',
system: true,
},
],
});
});

it('dont start new launch if launchDataRQ.id is not empty', () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/rest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ describe('RestClient', () => {
debug: true,
},
};
const restClient = new RestClient(optionsWithLoggerEnabled);
const client = new RestClient(optionsWithLoggerEnabled);

expect(spyLogger).toHaveBeenCalledWith(restClient.axiosInstance);
expect(spyLogger).toHaveBeenCalledWith(client.axiosInstance);
});
});

Expand Down
2 changes: 1 addition & 1 deletion lib/report-portal-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ class RPClient {
const isItemUuid = itemUuid !== launchUuid;
return this.restClient.create(
url,
Object.assign(saveLogRQ, { launchUuid }, isItemUuid && { itemUuid })
Object.assign(saveLogRQ, { launchUuid }, isItemUuid && { itemUuid }),
);
};
return this.saveLog(itemObj, requestPromise);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "npm run clean && tsc",
"clean": "rimraf ./build",
"lint": "eslint ./statistics/**/* ./lib/**/* ./spec/**/*",
"lint": "eslint ./statistics/**/* ./lib/**/* ./__tests__/**/*",
"format": "npm run lint -- --fix",
"test": "jest",
"test:coverage": "jest --coverage"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"outDir": "./build"
},
"include": [
"statistics/**/*", "lib/**/*", "spec/**/*"],
"statistics/**/*", "lib/**/*", "__tests__/**/*"],
"exclude": ["node_modules"]
}

0 comments on commit fc1e2da

Please sign in to comment.