File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ export class RunContextBase<GeneratorType extends BaseGenerator = DefaultGenerat
83
83
private options : Partial < Omit < GetGeneratorOptions < GeneratorType > , 'env' | 'namespace' | 'resolved' > > = { } ;
84
84
private answers ?: any ;
85
85
private readonly adapterOptions ?: Omit < TestAdapterOptions , 'mockedAnswers' > = { } ;
86
+ private readonly askedQuestions : { name : string ; answer : any } [ ] = [ ] ;
86
87
private keepFsState ?: boolean ;
87
88
88
89
private readonly onGeneratorCallbacks : Array < ( this : this, generator : GeneratorType ) => any > = [ ] ;
@@ -664,6 +665,11 @@ export class RunContextBase<GeneratorType extends BaseGenerator = DefaultGenerat
664
665
async build ( ) : Promise < void > {
665
666
await this . prepare ( ) ;
666
667
668
+ const promptCallback = ( answer , opts ) => {
669
+ const { question } = opts ;
670
+ this . askedQuestions . push ( { name : question . name , answer } ) ;
671
+ return this . adapterOptions . callback ? this . adapterOptions . callback ( answer , opts ) : answer ;
672
+ } ) ;
667
673
const testEnv = await this . helpers . createTestEnv ( this . envOptions . createEnv , {
668
674
cwd : this . settings . forwardCwd ? this . targetDirectory : undefined ,
669
675
sharedFs : this . memFs ,
You can’t perform that action at this time.
0 commit comments