@@ -11,11 +11,12 @@ vi.mock('../../../../src/external-tools/trufflehog/from-download', () => ({
1111} ) )
1212
1313async function loadFresh ( ) {
14- const vfsMod = await import ( '../../../../src/external-tools/trufflehog/from-vfs' )
15- const pathMod = await import ( '../../../../src/external-tools/trufflehog/from-path' )
16- const dlMod = await import (
17- '../../../../src/external-tools/trufflehog/from-download'
18- )
14+ const vfsMod =
15+ await import ( '../../../../src/external-tools/trufflehog/from-vfs' )
16+ const pathMod =
17+ await import ( '../../../../src/external-tools/trufflehog/from-path' )
18+ const dlMod =
19+ await import ( '../../../../src/external-tools/trufflehog/from-download' )
1920 const mod = await import ( '../../../../src/external-tools/trufflehog/resolve' )
2021 return {
2122 fromVfs : vfsMod . trufflehogFromVfs as ReturnType < typeof vi . fn > ,
@@ -39,7 +40,10 @@ describe.sequential('external-tools/trufflehog/resolve — doResolveTrufflehog',
3940 test ( 'returns the PATH result when trufflehog is on PATH' , async ( ) => {
4041 const { doResolveTrufflehog, fromPath, fromVfs } = await loadFresh ( )
4142 fromVfs . mockResolvedValueOnce ( undefined )
42- const expected = { binaryPath : '/usr/bin/trufflehog' , source : 'path' as const }
43+ const expected = {
44+ binaryPath : '/usr/bin/trufflehog' ,
45+ source : 'path' as const ,
46+ }
4347 fromPath . mockResolvedValueOnce ( expected )
4448 expect ( await doResolveTrufflehog ( ) ) . toBe ( expected )
4549 } )
@@ -56,7 +60,10 @@ describe.sequential('external-tools/trufflehog/resolve — doResolveTrufflehog',
5660 await loadFresh ( )
5761 fromVfs . mockResolvedValueOnce ( undefined )
5862 fromPath . mockResolvedValueOnce ( undefined )
59- const expected = { binaryPath : '/cache/trufflehog' , source : 'download' as const }
63+ const expected = {
64+ binaryPath : '/cache/trufflehog' ,
65+ source : 'download' as const ,
66+ }
6067 fromDownload . mockResolvedValueOnce ( expected )
6168 const opts = {
6269 downloadIfMissing : { platformArch : 'darwin-arm64' , version : '1.22.0' } ,
@@ -70,7 +77,10 @@ describe.sequential('external-tools/trufflehog/resolve — resolveTrufflehog mem
7077 test ( 'memoizes by cacheKey within one module instance' , async ( ) => {
7178 const { fromPath, fromVfs, resolveTrufflehog } = await loadFresh ( )
7279 fromVfs . mockResolvedValue ( undefined )
73- const expected = { binaryPath : '/usr/bin/trufflehog' , source : 'path' as const }
80+ const expected = {
81+ binaryPath : '/usr/bin/trufflehog' ,
82+ source : 'path' as const ,
83+ }
7484 fromPath . mockResolvedValueOnce ( expected )
7585 const a = await resolveTrufflehog ( )
7686 const b = await resolveTrufflehog ( )
@@ -80,7 +90,8 @@ describe.sequential('external-tools/trufflehog/resolve — resolveTrufflehog mem
8090 } )
8191
8292 test ( 'uses separate cache slots for different option shapes' , async ( ) => {
83- const { fromDownload, fromPath, fromVfs, resolveTrufflehog } = await loadFresh ( )
93+ const { fromDownload, fromPath, fromVfs, resolveTrufflehog } =
94+ await loadFresh ( )
8495 fromVfs . mockResolvedValue ( undefined )
8596 fromPath . mockResolvedValue ( undefined )
8697 const dl = { binaryPath : '/cache/trufflehog' , source : 'download' as const }
0 commit comments