File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/bygger-backend/src/services/forms Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -8,16 +8,20 @@ vi.mock('../../fetchUtils', () => ({
8
8
fetchWithErrorHandling : vi . fn ( ) ,
9
9
} ) ) ;
10
10
11
- vi . mock ( '../utils/formsApiUtils' , ( ) => ( {
12
- createHeaders : vi . fn ( ) ,
13
- } ) ) ;
11
+ vi . mock ( import ( '../utils/formsApiUtils' ) , async ( importOriginal ) => {
12
+ const actual = await importOriginal ( ) ;
13
+ return {
14
+ ...actual ,
15
+ createHeaders : vi . fn ( ) ,
16
+ } ;
17
+ } ) ;
14
18
15
19
describe ( 'FormsService' , ( ) => {
16
20
const formsApiUrl = 'http://example.com' ;
17
21
let formsService ;
18
22
const accessToken = 'test-token' ;
19
23
const form : Form = {
20
- properties : { } as FormPropertiesType ,
24
+ properties : { submissionTypes : [ ] } as unknown as FormPropertiesType ,
21
25
id : 1 ,
22
26
path : 'test-form' ,
23
27
title : 'Test Form' ,
You can’t perform that action at this time.
0 commit comments