@@ -57,6 +57,21 @@ describe('cook', () => {
5757 ] ) ;
5858 } ) ;
5959
60+ it ( 'uses TDD mode when forceTdd is true' , async ( ) => {
61+ const { executedCommands } = await runMain ( {
62+ choices : { exercise : '3-recipe-search-async-pipe' } ,
63+ nxJsonContent : { } ,
64+ } ) ;
65+
66+ expect ( executedCommands ) . toEqual ( [
67+ 'git switch main' ,
68+ 'git branch -D cooking || exit 0' ,
69+ 'git switch -c cooking' ,
70+ 'git add .' ,
71+ 'git commit -m "feat: ✨ focus on 3-recipe-search-async-pipe-starter"' ,
72+ ] ) ;
73+ } ) ;
74+
6075 it ( 'checks out solution' , async ( ) => {
6176 const { executedCommands, files } = await runMain ( {
6277 choices : { command : 'solution' , confirmOverwrite : true } ,
@@ -150,6 +165,12 @@ async function runMain({
150165 implementationFiles : [ 'src/app/recipe/recipe-search.ng.ts' ] ,
151166 } ,
152167 { id : '2-test-double' , name : 'Test Double' } ,
168+ {
169+ id : '3-recipe-search-async-pipe' ,
170+ name : 'Recipe Search Async Pipe' ,
171+ forceTdd : true ,
172+ implementationFiles : [ 'src/app/recipe/recipe-search.ng.ts' ] ,
173+ } ,
153174 ] ;
154175
155176 await main ( args , {
0 commit comments