Skip to content

Commit 66a866d

Browse files
committed
fix types
1 parent 359716c commit 66a866d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/bygger-backend/src/migration/filterUtils.test.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Component } from '@navikt/skjemadigitalisering-shared-domain';
12
import { componentHasDependencyMatchingFilters, getPropertyFromTarget, targetMatchesFilters } from './filterUtils';
23
import {
34
componentWithAdvancedConditionalToRadio,
@@ -10,17 +11,15 @@ import {
1011
describe('filterUtils', () => {
1112
describe('getPropertyFromComponent', () => {
1213
it('gets the value of a property in the object as a string', () => {
13-
const actual = getPropertyFromTarget({ value: 'the value' }, ['value']);
14+
const actual = getPropertyFromTarget({ value: 'the value' } as unknown as Component, ['value']);
1415
expect(actual).toBe('the value');
1516
});
1617

1718
it('gets properties from nested objects', () => {
18-
const actual = getPropertyFromTarget({ firstLevel: { secondLevel: { thirdLevel: { value: 'the value' } } } }, [
19-
'firstLevel',
20-
'secondLevel',
21-
'thirdLevel',
22-
'value',
23-
]);
19+
const actual = getPropertyFromTarget(
20+
{ firstLevel: { secondLevel: { thirdLevel: { value: 'the value' } } } } as unknown as Component,
21+
['firstLevel', 'secondLevel', 'thirdLevel', 'value'],
22+
);
2423
expect(actual).toBe('the value');
2524
});
2625
});

0 commit comments

Comments
 (0)