@@ -17,6 +17,7 @@ const createSymlink = require("@lerna/create-symlink");
17
17
// helpers
18
18
const initFixture = require ( "@lerna-test/init-fixture" ) ( __dirname ) ;
19
19
const normalizeRelativeDir = require ( "@lerna-test/normalize-relative-dir" ) ;
20
+ const updateLernaConfig = require ( "@lerna-test/update-lerna-config" ) ;
20
21
21
22
// file under test
22
23
const lernaBootstrap = require ( "@lerna-test/command-runner" ) ( require ( "../command" ) ) ;
@@ -282,7 +283,10 @@ describe("BootstrapCommand", () => {
282
283
it ( "hoists appropriately" , async ( ) => {
283
284
const testDir = await initFixture ( "cold" ) ;
284
285
285
- await lernaBootstrap ( testDir ) ( "--hoist" ) ;
286
+ await updateLernaConfig ( testDir , {
287
+ hoist : true ,
288
+ } ) ;
289
+ await lernaBootstrap ( testDir ) ( ) ;
286
290
287
291
expect ( installedPackagesInDirectories ( testDir ) ) . toMatchSnapshot ( ) ;
288
292
expect ( symlinkedDirectories ( testDir ) ) . toMatchSnapshot ( ) ;
@@ -301,7 +305,15 @@ describe("BootstrapCommand", () => {
301
305
it ( "hoists appropriately" , async ( ) => {
302
306
const testDir = await initFixture ( "warm" ) ;
303
307
304
- await lernaBootstrap ( testDir ) ( "--hoist" ) ;
308
+ await updateLernaConfig ( testDir , {
309
+ command : {
310
+ // "commands" also supported
311
+ bootstrap : {
312
+ hoist : true ,
313
+ } ,
314
+ } ,
315
+ } ) ;
316
+ await lernaBootstrap ( testDir ) ( ) ;
305
317
306
318
expect ( installedPackagesInDirectories ( testDir ) ) . toMatchSnapshot ( ) ;
307
319
expect ( symlinkedDirectories ( testDir ) ) . toMatchSnapshot ( ) ;
0 commit comments