Skip to content

Commit 6a73643

Browse files
authored
Merge pull request #336 from KoolTheba/chore/upgrade-dependencies
Chore: upgrade dependencies
2 parents fa59c4d + 75a9688 commit 6a73643

File tree

5 files changed

+44
-17
lines changed

5 files changed

+44
-17
lines changed

cypress/e2e/comparator.cy.ts

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,11 @@ describe("Comparator", () => {
181181
.should("contain", "Unchanged")
182182
.and("have.css", "background-color")
183183
.and("eq", "rgb(108, 117, 125)");
184-
185-
cy.get('[data-testid="Binary-Artifacts-score"] > span').should("contain", "0/10");
184+
185+
cy.get('[data-testid="Binary-Artifacts-score"] > span').should(
186+
"contain",
187+
"0/10",
188+
);
186189

187190
cy.get('[data-testid="Branch-Protection"]').should(
188191
"contain",
@@ -222,7 +225,10 @@ describe("Comparator", () => {
222225
.should("contain", "Unchanged")
223226
.and("have.css", "background-color")
224227
.and("eq", "rgb(108, 117, 125)");
225-
cy.get('[data-testid="Code-Review-score"] > span').should("contain", "0/10");
228+
cy.get('[data-testid="Code-Review-score"] > span').should(
229+
"contain",
230+
"0/10",
231+
);
226232
cy.get('[data-testid="Code-Review"] ~ h4').should(
227233
"contain",
228234
"Additional details / variations",
@@ -233,7 +239,10 @@ describe("Comparator", () => {
233239
.should("contain", "Unchanged")
234240
.and("have.css", "background-color")
235241
.and("eq", "rgb(108, 117, 125)");
236-
cy.get('[data-testid="Contributors-score"] > span').should("contain", "10/10");
242+
cy.get('[data-testid="Contributors-score"] > span').should(
243+
"contain",
244+
"10/10",
245+
);
237246

238247
cy.get('[data-testid="Dangerous-Workflow"]').should(
239248
"contain",
@@ -280,14 +289,20 @@ describe("Comparator", () => {
280289
.should("contain", "Unchanged")
281290
.and("have.css", "background-color")
282291
.and("eq", "rgb(108, 117, 125)");
283-
cy.get('[data-testid="Maintained-score"] > span').should("contain", "10/10");
292+
cy.get('[data-testid="Maintained-score"] > span').should(
293+
"contain",
294+
"10/10",
295+
);
284296
cy.get('[data-testid="Maintained"] ~ h4').should(
285297
"contain",
286298
"Additional details / variations",
287299
);
288300

289301
cy.get('[data-testid="Packaging"]').should("contain", "Packaging");
290-
cy.get('[data-testid="Packaging-score"] > abbr > span').should("contain", "?");
302+
cy.get('[data-testid="Packaging-score"] > abbr > span').should(
303+
"contain",
304+
"?",
305+
);
291306

292307
cy.get('[data-testid="Pinned-Dependencies"]').should(
293308
"contain",
@@ -321,13 +336,19 @@ describe("Comparator", () => {
321336
.should("contain", "Unchanged")
322337
.and("have.css", "background-color")
323338
.and("eq", "rgb(108, 117, 125)");
324-
cy.get('[data-testid="Security-Policy-score"] > span').should("contain", "10/10");
339+
cy.get('[data-testid="Security-Policy-score"] > span').should(
340+
"contain",
341+
"10/10",
342+
);
325343

326344
cy.get('[data-testid="Signed-Releases"]').should(
327345
"contain",
328346
"Signed-Releases",
329347
);
330-
cy.get('[data-testid="Signed-Releases-score"] > abbr > span').should("contain", "?");
348+
cy.get('[data-testid="Signed-Releases-score"] > abbr > span').should(
349+
"contain",
350+
"?",
351+
);
331352

332353
cy.get('[data-testid="Token-Permissions"]').should(
333354
"contain",
@@ -354,7 +375,10 @@ describe("Comparator", () => {
354375
.should("contain", "Increased 2.7")
355376
.and("have.css", "background-color")
356377
.and("eq", "rgb(24, 135, 84)");
357-
cy.get('[data-testid="Vulnerabilities-score"] > span').should("contain", "10/10");
378+
cy.get('[data-testid="Vulnerabilities-score"] > span').should(
379+
"contain",
380+
"10/10",
381+
);
358382
cy.get('[data-testid="Vulnerabilities"] ~ h4').should(
359383
"contain",
360384
"Additional details / variations",

package-lock.json

Lines changed: 4 additions & 4 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
@@ -56,6 +56,6 @@
5656
"@types/diff": "5.2.0",
5757
"cypress": "13.6.0",
5858
"eslint-config-prettier": "9.1.0",
59-
"prettier": "3.2.4"
59+
"prettier": "3.2.5"
6060
}
6161
}

src/components/ProjectComparator.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ function ProjectComparator() {
154154
<div data-testid={element.name} className="heading__wrapper">
155155
<div className="info-badge__wrapper">
156156
<h3>{element.name}</h3>
157-
<div data-testid={`${element.name}-score`} className="info-score__wrapper">
157+
<div
158+
data-testid={`${element.name}-score`}
159+
className="info-score__wrapper"
160+
>
158161
{element.score >= 0 ? (
159162
<>
160163
{scoreChecker(element.score, element.prevScore)}

src/utils/comparator/scoreChecker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Badge from "../../components/Badge";
22

33
export const scoreChecker = (currentValue: number, previousValue: number) => {
4-
if(currentValue < 0){
4+
if (currentValue < 0) {
55
currentValue = 0;
66
}
77

8-
if (previousValue < 0){
8+
if (previousValue < 0) {
99
previousValue = 0;
1010
}
1111

0 commit comments

Comments
 (0)