Skip to content

Commit

Permalink
fix: remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
m-maillot committed Nov 5, 2024
1 parent 65ab7d7 commit cbc839d
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 412 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@
"test:type": "tsc --noEmit",
"test:unit": "jest",
"test:update": "jest --updateSnapshot",
"test:watch": "yarn test:unit --watch",
"build": "tsc && rm -rf ./dist/update-cc/data-cc && cp -r ./update-cc/data-cc ./dist/update-cc/data-cc",
"update-cc": "npm run build && node dist/update-cc/index.js"
"test:watch": "yarn test:unit --watch"
},
"types": "./src/index.d.ts",
"babel": {
Expand Down
4 changes: 2 additions & 2 deletions src/libs/__tests__/getAgreementIdFromIdOrIdcc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ describe(`libs/getAgreementIdFromIdOrIdcc()`, () => {
});

it(`with an existing agreement IDCC (string)`, () => {
expect(getAgreementIdFromIdOrIdcc("1480")).toBe("KALICONT000005635444");
expect(getAgreementIdFromIdOrIdcc("3239")).toBe("KALICONT000044594539");
});

it(`with an existing agreement IDCC (number)`, () => {
expect(getAgreementIdFromIdOrIdcc(1480)).toBe("KALICONT000005635444");
expect(getAgreementIdFromIdOrIdcc(3239)).toBe("KALICONT000044594539");
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/libs/getAgreementIdFromIdOrIdcc.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const isAgreementId = id => typeof id === "string" && /^KALICONT\d{12}$/.test(id
function getAgreementIdFromIdOrIdcc(agreementIdOrIdcc) {
if (isAgreementIdcc(agreementIdOrIdcc)) {
const idcc = Number(agreementIdOrIdcc);
const matchIdcc = ({ num }) => num === idcc;
const matchIdcc = ({ num }) => Number(num) === idcc;
const maybeAgreement = INDEXED_AGREEMENTS.find(matchIdcc);
if (maybeAgreement === undefined) {
throw new Error(`No agreement found with this IDCC (${idcc}).`);
Expand Down
48 changes: 0 additions & 48 deletions update-cc/api.ts

This file was deleted.

3 changes: 0 additions & 3 deletions update-cc/data-cc/dares.xlsx

This file was deleted.

3 changes: 0 additions & 3 deletions update-cc/data-cc/idcc_liens.xlsx

This file was deleted.

3 changes: 0 additions & 3 deletions update-cc/data-cc/idcc_sans_liens.xlsx

This file was deleted.

3 changes: 0 additions & 3 deletions update-cc/data-cc/verify_cc.xlsx

This file was deleted.

3 changes: 0 additions & 3 deletions update-cc/data-cc/weez.csv

This file was deleted.

117 changes: 0 additions & 117 deletions update-cc/difference.ts

This file was deleted.

109 changes: 0 additions & 109 deletions update-cc/index.ts

This file was deleted.

47 changes: 0 additions & 47 deletions update-cc/infos.ts

This file was deleted.

Loading

0 comments on commit cbc839d

Please sign in to comment.