@@ -9,7 +9,7 @@ import * as assert from 'uvu/assert';
99import { suite } from 'uvu' ;
1010import { rigTest } from './util/rig-test.js' ;
1111import { WireitTestRig } from './util/test-rig.js' ;
12- import { Options } from '../cli-options.js' ;
12+ import { Agent , Options } from '../cli-options.js' ;
1313import { Result } from '../error.js' ;
1414
1515const test = suite < object > ( ) ;
@@ -39,6 +39,29 @@ async function getOptionsResult(
3939 } ,
4040 } ,
4141 } ) ;
42+
43+ if ( command . startsWith ( 'yarnBerry' ) ) {
44+ await rig . write ( {
45+ 'yarn.lock' :
46+ `# This file is generated by running "yarn install" inside your project.
47+ # Manual changes might be lost - proceed with caution!
48+
49+ __metadata:
50+ version: 8
51+ cacheKey: 10c0
52+
53+ "root-workspace-0b6124@workspace:.":
54+ version: 0.0.0-use.local
55+ resolution: "root-workspace-0b6124@workspace:."
56+ languageName: unknown
57+ linkType: soft
58+ ` ,
59+ } ) ;
60+ await rig . write ( {
61+ '.yarnrc.yml' : 'nodeLinker: node-modules'
62+ } ) ;
63+ }
64+
4265 env = { ...env , WIREIT_DEBUG_LOG_FILE : '' } ;
4366 assert . equal ( ( await rig . exec ( command , { env} ) . exit ) . code , 0 ) ;
4467 return JSON . parse ( await rig . read ( 'options.json' ) ) as Result < Options > ;
@@ -67,8 +90,8 @@ async function assertOptions(
6790 } ) ;
6891}
6992
70- for ( const command of [ 'npm' , 'yarn' , 'pnpm' ] as const ) {
71- const agent = command === 'yarn' ? 'yarnClassic' : command ;
93+ for ( const command of [ 'npm' , 'yarn' , 'pnpm' , 'yarnBerry' ] as const ) {
94+ const agent : Agent = command === 'yarn' ? 'yarnClassic' : command ;
7295 // eslint-disable-next-line @typescript-eslint/unbound-method
7396 const skipIfYarn = command === 'yarn' ? test . skip : test ;
7497 // eslint-disable-next-line @typescript-eslint/unbound-method
0 commit comments