@@ -196,6 +196,26 @@ describe(`Protocols`, () => {
196
196
) ,
197
197
) ;
198
198
199
+ test (
200
+ `it should use pnpm to setup pnpm repositories` ,
201
+ makeTemporaryEnv (
202
+ {
203
+ dependencies : {
204
+ [ `pnpm-project` ] : tests . startPackageServer ( ) . then ( url => `${ url } /repositories/pnpm-project.git` ) ,
205
+ } ,
206
+ } ,
207
+ async ( { path, run, source} ) => {
208
+ await expect ( run ( `install` , {
209
+ env : {
210
+ NODE_ENV : `production` ,
211
+ } ,
212
+ } ) ) . resolves . toBeTruthy ( ) ;
213
+
214
+ await expect ( source ( `require('pnpm-project')` ) ) . resolves . toMatch ( / \b p n p m \/ [ 0 - 9 ] + / ) ;
215
+ } ,
216
+ ) ,
217
+ ) ;
218
+
199
219
test (
200
220
`it should guarantee that all dependencies will be installed when using npm to setup npm repositories` ,
201
221
makeTemporaryEnv (
@@ -263,6 +283,31 @@ describe(`Protocols`, () => {
263
283
) ,
264
284
) ;
265
285
286
+ test (
287
+ `it should support installing specific workspaces from pnpm repositories` ,
288
+ makeTemporaryEnv (
289
+ {
290
+ dependencies : {
291
+ [ `pkg-a` ] : tests . startPackageServer ( ) . then ( url => `${ url } /repositories/pnpm-workspaces.git#workspace=pkg-a` ) ,
292
+ [ `pkg-b` ] : tests . startPackageServer ( ) . then ( url => `${ url } /repositories/pnpm-workspaces.git#workspace=pkg-b` ) ,
293
+ } ,
294
+ } ,
295
+ async ( { path, run, source} ) => {
296
+ await run ( `install` ) ;
297
+
298
+ await expect ( source ( `require('pkg-a/package.json')` ) ) . resolves . toMatchObject ( {
299
+ name : `pkg-a` ,
300
+ version : `1.0.0` ,
301
+ } ) ;
302
+
303
+ await expect ( source ( `require('pkg-b/package.json')` ) ) . resolves . toMatchObject ( {
304
+ name : `pkg-b` ,
305
+ version : `1.0.0` ,
306
+ } ) ;
307
+ } ,
308
+ ) ,
309
+ ) ;
310
+
266
311
test (
267
312
`it should not use Corepack to fetch Yarn Classic` ,
268
313
makeTemporaryEnv (
0 commit comments