@@ -94,7 +94,7 @@ describe('project scaffolder', () => {
94
94
const contributingResults = any . simpleObject ( ) ;
95
95
when ( optionsValidator . validate )
96
96
. calledWith ( options )
97
- . mockReturnValue ( { languages : languageScaffolders , vcsHosts, decisions, dependencyUpdaters} ) ;
97
+ . mockReturnValue ( { languages : languageScaffolders , vcsHosts, decisions, plugins : { dependencyUpdaters} } ) ;
98
98
when ( prompts . promptForBaseDetails )
99
99
. calledWith ( projectPath , decisions )
100
100
. mockResolvedValue ( {
@@ -160,7 +160,7 @@ describe('project scaffolder', () => {
160
160
161
161
it ( 'should consider all options to be optional' , async ( ) => {
162
162
const gitRepoShouldBeInitialized = any . boolean ( ) ;
163
- optionsValidator . validate . mockReturnValue ( { } ) ;
163
+ optionsValidator . validate . mockReturnValue ( { plugins : { } } ) ;
164
164
when ( prompts . promptForBaseDetails )
165
165
. calledWith ( projectPath , undefined )
166
166
. mockResolvedValue ( {
@@ -175,9 +175,9 @@ describe('project scaffolder', () => {
175
175
. toHaveBeenCalledWith ( gitRepoShouldBeInitialized , projectPath , projectName , { } , undefined , undefined ) ;
176
176
} ) ;
177
177
178
- it ( 'should consider each option optional' , async ( ) => {
178
+ it ( 'should consider each option except the plugins map optional' , async ( ) => {
179
179
const emptyOptions = { } ;
180
- when ( optionsValidator . validate ) . calledWith ( emptyOptions ) . mockReturnValue ( { } ) ;
180
+ when ( optionsValidator . validate ) . calledWith ( emptyOptions ) . mockReturnValue ( { plugins : { } } ) ;
181
181
when ( prompts . promptForBaseDetails ) . calledWith ( projectPath , undefined , undefined ) . mockResolvedValue ( { } ) ;
182
182
languagePrompt . default . mockResolvedValue ( { } ) ;
183
183
scaffoldGit . mockResolvedValue ( { } ) ;
@@ -223,7 +223,7 @@ describe('project scaffolder', () => {
223
223
} ) ;
224
224
225
225
it ( 'should not scaffold the git repo if not requested' , async ( ) => {
226
- when ( optionsValidator . validate ) . calledWith ( options ) . mockReturnValue ( { } ) ;
226
+ when ( optionsValidator . validate ) . calledWith ( options ) . mockReturnValue ( { plugins : { } } ) ;
227
227
prompts . promptForBaseDetails . mockResolvedValue ( { [ questionNames . GIT_REPO ] : false } ) ;
228
228
languagePrompt . default . mockResolvedValue ( { } ) ;
229
229
scaffoldReadme . mockResolvedValue ( ) ;
@@ -259,7 +259,7 @@ describe('project scaffolder', () => {
259
259
} ;
260
260
when ( optionsValidator . validate )
261
261
. calledWith ( options )
262
- . mockReturnValue ( { languages : languageScaffolders , vcsHosts, decisions} ) ;
262
+ . mockReturnValue ( { languages : languageScaffolders , vcsHosts, decisions, plugins : { } } ) ;
263
263
scaffoldGit . mockResolvedValue ( vcs ) ;
264
264
liftGit . mockResolvedValue ( { nextSteps : gitNextSteps } ) ;
265
265
prompts . promptForBaseDetails . mockResolvedValue ( {
@@ -308,7 +308,7 @@ describe('project scaffolder', () => {
308
308
it ( 'should consider the language details to be optional' , async ( ) => {
309
309
when ( optionsValidator . validate )
310
310
. calledWith ( options )
311
- . mockReturnValue ( { languages : languageScaffolders , vcsHosts, decisions} ) ;
311
+ . mockReturnValue ( { languages : languageScaffolders , vcsHosts, decisions, plugins : { } } ) ;
312
312
scaffoldGit . mockResolvedValue ( vcs ) ;
313
313
prompts . promptForBaseDetails . mockResolvedValue ( {
314
314
[ coreQuestionNames . PROJECT_NAME ] : projectName ,
@@ -334,7 +334,7 @@ describe('project scaffolder', () => {
334
334
} ) ;
335
335
336
336
it ( 'should pass the license to the language scaffolder as `UNLICENSED` when no license was chosen' , async ( ) => {
337
- when ( optionsValidator . validate ) . calledWith ( options ) . mockReturnValue ( { } ) ;
337
+ when ( optionsValidator . validate ) . calledWith ( options ) . mockReturnValue ( { plugins : { } } ) ;
338
338
prompts . promptForBaseDetails . mockResolvedValue ( { } ) ;
339
339
languagePrompt . default . mockResolvedValue ( { [ questionNames . PROJECT_LANGUAGE ] : projectLanguage } ) ;
340
340
scaffoldGit . mockResolvedValue ( { } ) ;
@@ -356,7 +356,7 @@ describe('project scaffolder', () => {
356
356
} ) ;
357
357
358
358
it ( 'should not run a verification command when one is not provided' , async ( ) => {
359
- when ( optionsValidator . validate ) . calledWith ( options ) . mockReturnValue ( { } ) ;
359
+ when ( optionsValidator . validate ) . calledWith ( options ) . mockReturnValue ( { plugins : { } } ) ;
360
360
prompts . promptForBaseDetails . mockResolvedValue ( { } ) ;
361
361
languagePrompt . default . mockResolvedValue ( { } ) ;
362
362
scaffoldGit . mockResolvedValue ( { } ) ;
0 commit comments