Skip to content

Commit 1804fef

Browse files
fix: ensure proper type assertion for fs client in integrationContext function
1 parent 253a98c commit 1804fef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/helpers/integrationContext.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { FsClient, HttpClient } from 'git-essentials'
2+
23
import { IndexedDbFsClient } from 'src/clients/fs/IndexedDbFsClient'
3-
import { makeWebHttpClient } from 'src/clients/http/WebHttpClient'
44
import { makeNodeHttpClient } from 'src/clients/http/NodeHttpClient'
5+
import { makeWebHttpClient } from 'src/clients/http/WebHttpClient'
56

67
const isBrowser = () => typeof window !== `undefined`
78

@@ -21,7 +22,7 @@ export async function integrationContext(action: (context: IntegrationContext) =
2122
http: makeWebHttpClient({ transformRequestUrl: corsProxyUrlTransformer }),
2223
dir: `/temp_${generateId(20)}`
2324
} : {
24-
fs: (await import('fs')).promises,
25+
fs: (await import('fs')).promises as FsClient,
2526
http: makeNodeHttpClient(),
2627
dir: `${(await import('os')).tmpdir()}/temp_${generateId(20)}`
2728
}

0 commit comments

Comments
 (0)