nortax-ts
Version:
Norwegian Tax Calculator - TypeScript Implementation
29 lines (28 loc) • 1.28 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const constants_1 = require("../constants");
describe('Constants', () => {
describe('BASE_URL', () => {
it('should be defined', () => {
expect(constants_1.BASE_URL).toBeDefined();
expect(constants_1.BASE_URL).toBe('https://trekktabell.formueinntekt.skatt.skatteetaten.no/api/trekktabell');
});
});
describe('PERIODS', () => {
it('should have correct mappings', () => {
expect(constants_1.PERIODS['Wage']).toBe('LONN');
expect(constants_1.PERIODS['Pension']).toBe('PENSJON');
expect(constants_1.PERIODS['Monthly']).toBe('PERIODE_1_MAANED');
expect(constants_1.PERIODS['1 week']).toBe('PERIODE_1_UKE');
});
});
describe('ALIASES', () => {
it('should have correct API parameter mappings', () => {
expect(constants_1.ALIASES.chosenTable).toBe('tabell');
expect(constants_1.ALIASES.chosenIncome).toBe('bruttoloenn');
expect(constants_1.ALIASES.chosenPeriod).toBe('periode');
expect(constants_1.ALIASES.chosenYear).toBe('iaar');
expect(constants_1.ALIASES.chosenIncomeType).toBe('inntektstype');
});
});
});