@@ -7,11 +7,11 @@ import { AGENTS, detect } from '../../src'
7
7
8
8
let basicLog : SpyInstance , errorLog : SpyInstance , warnLog : SpyInstance , infoLog : SpyInstance
9
9
10
- function detectTest ( agent : string ) {
10
+ function detectTest ( fixture : string , agent : string ) {
11
11
return async ( ) => {
12
12
const cwd = await fs . mkdtemp ( path . join ( tmpdir ( ) , 'ni-' ) )
13
- const fixture = path . join ( __dirname , '..' , 'fixtures' , 'lockfile' , agent )
14
- await fs . copy ( fixture , cwd )
13
+ const dir = path . join ( __dirname , '..' , 'fixtures' , fixture , agent )
14
+ await fs . copy ( dir , cwd )
15
15
16
16
expect ( await detect ( { programmatic : true , cwd } ) ) . toMatchSnapshot ( )
17
17
}
@@ -33,7 +33,7 @@ const fixtures = ['lockfile', 'packager']
33
33
34
34
// matrix testing of: fixtures x agents
35
35
fixtures . forEach ( fixture => describe ( fixture , ( ) => agents . forEach ( ( agent ) => {
36
- it ( agent , detectTest ( agent ) )
36
+ it ( agent , detectTest ( fixture , agent ) )
37
37
38
38
it ( 'no logs' , ( ) => {
39
39
expect ( basicLog ) . not . toHaveBeenCalled ( )
0 commit comments