import {describe, it} from 'node:test'; import assert from 'node:assert/strict'; import {internshipType} from '../mcf'; import { mapIcmsToMcfEmploymentType, mapMcfToIcmsEmploymentType, mapMcfToMsfEmploymentType, mapMsfToMcfEmploymentType, } from './employmentTypes'; describe('mapIcmsToMcfEmploymentType', () => { it('should map to Part Time when id is 440002', () => { assert.deepStrictEqual(mapIcmsToMcfEmploymentType(440002), {id: 5, employmentType: 'Part Time'}); }); it('should map to Permanent when id is 440003', () => { assert.deepStrictEqual(mapIcmsToMcfEmploymentType(440003), {id: 7, employmentType: 'Permanent'}); }); it('should map to Temporary when id is 440004', () => { assert.deepStrictEqual(mapIcmsToMcfEmploymentType(440004), {id: 2, employmentType: 'Temporary'}); }); it('should map to Contract when id is 440005', () => { assert.deepStrictEqual(mapIcmsToMcfEmploymentType(440005), {id: 3, employmentType: 'Contract'}); }); it('should map to Freelance when id is 440006', () => { assert.deepStrictEqual(mapIcmsToMcfEmploymentType(440006), {id: 6, employmentType: 'Freelance'}); }); it('should map to Full Time when id is 440007', () => { assert.deepStrictEqual(mapIcmsToMcfEmploymentType(440007), {id: 8, employmentType: 'Full Time'}); }); it('should map to Flexi-work when id is 440008', () => { assert.deepStrictEqual(mapIcmsToMcfEmploymentType(440008), {id: 9, employmentType: 'Flexi-work'}); }); it('should map to Internship when id is 440009', () => { assert.deepStrictEqual(mapIcmsToMcfEmploymentType(440009), {id: 10, employmentType: internshipType}); }); }); describe('mapMcfToIcmsEmploymentType', () => { it('should map to Part Time when id is 5', () => { assert.deepStrictEqual(mapMcfToIcmsEmploymentType(5), {id: 440002, employmentType: 'Part Time'}); }); it('should map to Permanent when id is 7', () => { assert.deepStrictEqual(mapMcfToIcmsEmploymentType(7), {id: 440003, employmentType: 'Permanent'}); }); it('should map to Temporary when id is 2', () => { assert.deepStrictEqual(mapMcfToIcmsEmploymentType(2), {id: 440004, employmentType: 'Temporary'}); }); it('should map to Contract when id is 3', () => { assert.deepStrictEqual(mapMcfToIcmsEmploymentType(3), {id: 440005, employmentType: 'Contract'}); }); it('should map to Full Time when id is 8', () => { assert.deepStrictEqual(mapMcfToIcmsEmploymentType(8), {id: 440007, employmentType: 'Full Time'}); }); it('should map to Flexi work when id is 9', () => { assert.deepStrictEqual(mapMcfToIcmsEmploymentType(9), {id: 440008, employmentType: 'Flexi work'}); }); it('should map to Internship when id is 10', () => { assert.deepStrictEqual(mapMcfToIcmsEmploymentType(10), {id: 440009, employmentType: 'Internship'}); }); it('should map to Freelance when id is 6', () => { assert.deepStrictEqual(mapMcfToIcmsEmploymentType(6), {id: 440006, employmentType: 'Freelance'}); }); }); describe('mapMsfToMcfEmploymentType', () => { it('should map to Part Time when id is 05', () => { assert.deepStrictEqual(mapMsfToMcfEmploymentType('05'), {id: 5, employmentType: 'Part Time'}); }); it('should map to Permanent when id is 07', () => { assert.deepStrictEqual(mapMsfToMcfEmploymentType('07'), {id: 7, employmentType: 'Permanent'}); }); it('should map to Temporary when id is 02', () => { assert.deepStrictEqual(mapMsfToMcfEmploymentType('02'), {id: 2, employmentType: 'Temporary'}); }); it('should map to Contract when id is 03', () => { assert.deepStrictEqual(mapMsfToMcfEmploymentType('03'), {id: 3, employmentType: 'Contract'}); }); it('should map to Freelance when id is 06', () => { assert.deepStrictEqual(mapMsfToMcfEmploymentType('06'), {id: 6, employmentType: 'Freelance'}); }); it('should map to Full Time when id is 08', () => { assert.deepStrictEqual(mapMsfToMcfEmploymentType('08'), {id: 8, employmentType: 'Full Time'}); }); it('should map to Flexi-work when id is 09', () => { assert.deepStrictEqual(mapMsfToMcfEmploymentType('09'), {id: 9, employmentType: 'Flexi-work'}); }); it('should map to Internship when id is 10', () => { assert.deepStrictEqual(mapMsfToMcfEmploymentType('10'), {id: 10, employmentType: internshipType}); }); }); describe('mapMcfToMsfEmploymentType', () => { it('should map to Part Time when id is 5', () => { assert.deepStrictEqual(mapMcfToMsfEmploymentType(5), {ilpId: '05', ilpDescription: 'Part Time'}); }); it('should map to Permanent when id is 7', () => { assert.deepStrictEqual(mapMcfToMsfEmploymentType(7), {ilpId: '07', ilpDescription: 'Permanent'}); }); it('should map to Temporary when id is 2', () => { assert.deepStrictEqual(mapMcfToMsfEmploymentType(2), {ilpId: '02', ilpDescription: 'Temporary'}); }); it('should map to Contract Basis when id is 3', () => { assert.deepStrictEqual(mapMcfToMsfEmploymentType(3), {ilpId: '03', ilpDescription: 'Contract Basis'}); }); it('should map to Full Time when id is 8', () => { assert.deepStrictEqual(mapMcfToMsfEmploymentType(8), {ilpId: '08', ilpDescription: 'Full Time'}); }); it('should map to Flexi Work when id is 9', () => { assert.deepStrictEqual(mapMcfToMsfEmploymentType(9), {ilpId: '09', ilpDescription: 'Flexi Work'}); }); it('should map to Internship when id is 10', () => { assert.deepStrictEqual(mapMcfToMsfEmploymentType(10), {ilpId: '10', ilpDescription: 'Internship'}); }); it('should map to Freelance when id is 6', () => { assert.deepStrictEqual(mapMcfToMsfEmploymentType(6), {ilpId: '06', ilpDescription: 'Freelance'}); }); });