-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
350 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript" | ||
}, | ||
"target": "es5" | ||
}, | ||
"module": { | ||
"type": "commonjs" | ||
}, | ||
"sourceMaps": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
229 changes: 159 additions & 70 deletions
229
...rc/modeles/conventions/2596_coiffure/__tests__/indemnite-licenciement/salaire-ref.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,169 @@ | ||
import { ReferenceSalary2596 } from "../../salary"; | ||
import { CatPro2596, ReferenceSalary2596 } from "../../salary"; | ||
|
||
describe("Calcul du salaire pour la CC 2596", () => { | ||
const ReferenceSalary = new ReferenceSalary2596(); | ||
|
||
it("Cas d'usage basique", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
salaires: [ | ||
{ month: "janvier", value: 2000 }, | ||
{ month: "février", value: 2000 }, | ||
{ month: "mars", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [], | ||
}) | ||
).toEqual(2000); | ||
}); | ||
it("Avec des primes pendant le préavis", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
salaires: [{ month: "janvier", value: 2000 }], | ||
salairesPendantPreavis: [ | ||
{ month: "février", prime: 1000, value: 2000 }, | ||
], | ||
}) | ||
).toEqual(2500); | ||
}); | ||
describe("Cadres ou agents de maîtrise", () => { | ||
it("Cas d'usage basique", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.cadres, | ||
salaires: [ | ||
{ month: "janvier", value: 2000 }, | ||
{ month: "février", value: 2000 }, | ||
{ month: "mars", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [], | ||
}) | ||
).toEqual(2000); | ||
}); | ||
it("Avec des primes pendant le préavis", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.cadres, | ||
salaires: [{ month: "janvier", value: 2000 }], | ||
salairesPendantPreavis: [ | ||
{ month: "février", prime: 1000, value: 2000 }, | ||
], | ||
}) | ||
).toEqual(2500); | ||
}); | ||
|
||
it("Avec un salaire différent sur deux mois", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
salaires: [ | ||
{ month: "février", value: 2000 }, | ||
{ month: "janvier", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [ | ||
{ month: "avril", value: 5000 }, | ||
{ month: "mars", value: 5000 }, | ||
], | ||
}) | ||
).toEqual(3500); | ||
}); | ||
it("Avec un salaire différent sur deux mois", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.cadres, | ||
salaires: [ | ||
{ month: "février", value: 2000 }, | ||
{ month: "janvier", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [ | ||
{ month: "avril", value: 5000 }, | ||
{ month: "mars", value: 5000 }, | ||
], | ||
}) | ||
).toEqual(3500); | ||
}); | ||
|
||
it("Avec un salaire différent sur 1 mois de préavis", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.cadres, | ||
salaires: [ | ||
{ month: "décembre", value: 2000 }, | ||
{ month: "novembre", value: 2000 }, | ||
{ month: "octobre", value: 2000 }, | ||
{ month: "septembre", value: 2000 }, | ||
{ month: "aout", value: 2000 }, | ||
{ month: "juillet", value: 2000 }, | ||
{ month: "juin", value: 2000 }, | ||
{ month: "mai", value: 2000 }, | ||
{ month: "avril", value: 2000 }, | ||
{ month: "mars", value: 2000 }, | ||
{ month: "février", value: 2000 }, | ||
{ month: "janvier", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [ | ||
{ month: "janvier", prime: 2500, value: 1500 }, | ||
], | ||
}) | ||
).toEqual(2166.6666666666665); | ||
}); | ||
|
||
it("Avec un salaire différent sur 1 mois de préavis", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
salaires: [ | ||
{ month: "décembre", value: 2000 }, | ||
{ month: "novembre", value: 2000 }, | ||
{ month: "octobre", value: 2000 }, | ||
{ month: "septembre", value: 2000 }, | ||
{ month: "aout", value: 2000 }, | ||
{ month: "juillet", value: 2000 }, | ||
{ month: "juin", value: 2000 }, | ||
{ month: "mai", value: 2000 }, | ||
{ month: "avril", value: 2000 }, | ||
{ month: "mars", value: 2000 }, | ||
{ month: "février", value: 2000 }, | ||
{ month: "janvier", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [ | ||
{ month: "janvier", prime: 2500, value: 1500 }, | ||
], | ||
}) | ||
).toEqual(2166.6666666666665); | ||
it("Avec un salaire différent sur trois mois et trois primes", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.cadres, | ||
salaires: [ | ||
{ month: "mars", value: 2500 }, | ||
{ month: "février", value: 2500 }, | ||
{ month: "janvier", value: 2500 }, | ||
], | ||
salairesPendantPreavis: [{ month: "avril", prime: 60, value: 2500 }], | ||
}) | ||
).toEqual(2515); | ||
}); | ||
}); | ||
|
||
it("Avec un salaire différent sur trois mois et trois primes", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
salaires: [ | ||
{ month: "mars", value: 2500 }, | ||
{ month: "février", value: 2500 }, | ||
{ month: "janvier", value: 2500 }, | ||
], | ||
salairesPendantPreavis: [{ month: "avril", prime: 60, value: 2500 }], | ||
}) | ||
).toEqual(2515); | ||
describe("Autres catégories", () => { | ||
it("Cas d'usage basique", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.coiffeur, | ||
salaires: [ | ||
{ month: "janvier", value: 2000 }, | ||
{ month: "février", value: 2000 }, | ||
{ month: "mars", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [], | ||
}) | ||
).toEqual(2000); | ||
}); | ||
it("Avec des primes pendant le préavis", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.coiffeur, | ||
salaires: [{ month: "janvier", value: 2000 }], | ||
salairesPendantPreavis: [ | ||
{ month: "février", prime: 1000, value: 2000 }, | ||
], | ||
}) | ||
).toEqual(2000); | ||
}); | ||
|
||
it("Avec un salaire différent sur deux mois", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.coiffeur, | ||
salaires: [ | ||
{ month: "février", value: 2000 }, | ||
{ month: "janvier", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [ | ||
{ month: "avril", value: 5000 }, | ||
{ month: "mars", value: 5000 }, | ||
], | ||
}) | ||
).toEqual(2000); | ||
}); | ||
|
||
it("Avec un salaire différent sur 1 mois de préavis", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.coiffeur, | ||
salaires: [ | ||
{ month: "décembre", value: 2000 }, | ||
{ month: "novembre", value: 2000 }, | ||
{ month: "octobre", value: 2000 }, | ||
{ month: "septembre", value: 2000 }, | ||
{ month: "aout", value: 2000 }, | ||
{ month: "juillet", value: 2000 }, | ||
{ month: "juin", value: 2000 }, | ||
{ month: "mai", value: 2000 }, | ||
{ month: "avril", value: 2000 }, | ||
{ month: "mars", value: 2000 }, | ||
{ month: "février", value: 2000 }, | ||
{ month: "janvier", value: 2000 }, | ||
], | ||
salairesPendantPreavis: [ | ||
{ month: "janvier", prime: 2500, value: 1500 }, | ||
], | ||
}) | ||
).toEqual(2000); | ||
}); | ||
|
||
it("Avec un salaire différent sur trois mois et trois primes", () => { | ||
expect( | ||
ReferenceSalary.computeReferenceSalary({ | ||
catPro: CatPro2596.coiffeur, | ||
salaires: [ | ||
{ month: "mars", value: 2500 }, | ||
{ month: "février", value: 2500 }, | ||
{ month: "janvier", value: 2500 }, | ||
], | ||
salairesPendantPreavis: [{ month: "avril", prime: 60, value: 2500 }], | ||
}) | ||
).toEqual(2500); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.