diff --git a/__tests__/jest/getYearsExperience.test.ts b/__tests__/jest/getYearsExperience.test.ts new file mode 100644 index 00000000..34844ee1 --- /dev/null +++ b/__tests__/jest/getYearsExperience.test.ts @@ -0,0 +1,13 @@ +import { getYearsExperience } from '@/utils/getYearsExperience' + +describe('getYearsExperience', () => { + it('should return the correct number of years', () => { + const startYear = 2010 + const currentYear = new Date().getFullYear() + const expectedYears = currentYear - startYear + + const result = getYearsExperience(startYear) + + expect(result).toEqual(expectedYears) + }) +})