Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Dec 23, 2024
1 parent 4e6fa2e commit 273b060
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/PolicyDistanceRatesUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {validateTaxClaimableValue} from '@libs/PolicyDistanceRatesUtils';

describe('PolicyDistanceRatesUtils', () => {
describe('validateTaxClaimableValue', () => {
it('should return false when taxClaimableValue is equal to rate', () => {
it('should return an error when taxClaimableValue is equal to tax rate', () => {
// Given a tax claimable value inserted for a distance rate
// When the taxClaimableValue is equal to the distance rate
// When the taxClaimableValue is equal to the tax rate
const validate = validateTaxClaimableValue({taxClaimableValue: '0.67'}, {rate: 67});

Check failure on line 8 in tests/unit/PolicyDistanceRatesUtilsTest.ts

View workflow job for this annotation

GitHub Actions / typecheck

Argument of type '{ rate: number; }' is not assignable to parameter of type '{ name?: string | undefined; rate?: number | undefined; currency?: string | undefined; customUnitRateID: string; enabled?: boolean | undefined; errors?: Errors | undefined; errorFields?: ErrorFields | undefined; attributes?: TaxRateAttributes | undefined; subRates?: Subrate[] | undefined; } & OfflineFeedback<...>'.
// Then validateTaxClaimableValue will return an error.
expect(validate.taxClaimableValue).toBeDefined();
Expand Down

0 comments on commit 273b060

Please sign in to comment.