File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
apps/302-recipe-search-integration-browser-mode-solution/src/app/recipe Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 1- import { render } from '@testing-library/ angular' ;
1+ import { TestBed } from '@angular/core/testing ' ;
22import { page } from 'vitest/browser' ;
33import { recipeMother } from '../testing/recipe.mother' ;
44import {
@@ -17,18 +17,17 @@ describe(RecipeSearch.name, () => {
1717 } ) ;
1818
1919 async function mountRecipeSearch ( ) {
20- await render ( RecipeSearch , {
20+ TestBed . configureTestingModule ( {
2121 providers : [ provideRecipeRepositoryFake ( ) ] ,
22- configureTestBed ( testBed ) {
23- testBed
24- . inject ( RecipeRepositoryFake )
25- . setRecipes ( [
26- recipeMother . withBasicInfo ( 'Burger' ) . build ( ) ,
27- recipeMother . withBasicInfo ( 'Salad' ) . build ( ) ,
28- ] ) ;
29- } ,
3022 } ) ;
3123
24+ TestBed . inject ( RecipeRepositoryFake ) . setRecipes ( [
25+ recipeMother . withBasicInfo ( 'Burger' ) . build ( ) ,
26+ recipeMother . withBasicInfo ( 'Salad' ) . build ( ) ,
27+ ] ) ;
28+
29+ TestBed . createComponent ( RecipeSearch ) ;
30+
3231 return {
3332 getRecipeNameEls ( ) {
3433 return page . getByRole ( 'heading' ) ;
You can’t perform that action at this time.
0 commit comments