Skip to content

Commit 39d90be

Browse files
committed
test: ✅ update starter
1 parent 85ca055 commit 39d90be

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

apps/302-recipe-search-integration-browser-mode-starter/src/app/recipe/recipe-search.browser.spec.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render } from '@testing-library/angular';
1+
import { TestBed } from '@angular/core/testing';
22
import { page } from 'vitest/browser';
33
import { recipeMother } from '../testing/recipe.mother';
44
import {
@@ -15,18 +15,17 @@ describe(RecipeSearch.name, () => {
1515
});
1616

1717
async function mountRecipeSearch() {
18-
await render(RecipeSearch, {
18+
TestBed.configureTestingModule({
1919
providers: [provideRecipeRepositoryFake()],
20-
configureTestBed(testBed) {
21-
testBed
22-
.inject(RecipeRepositoryFake)
23-
.setRecipes([
24-
recipeMother.withBasicInfo('Burger').build(),
25-
recipeMother.withBasicInfo('Salad').build(),
26-
]);
27-
},
2820
});
2921

22+
TestBed.inject(RecipeRepositoryFake).setRecipes([
23+
recipeMother.withBasicInfo('Burger').build(),
24+
recipeMother.withBasicInfo('Salad').build(),
25+
]);
26+
27+
TestBed.createComponent(RecipeSearch);
28+
3029
return {
3130
getRecipeNameEls() {
3231
throw new Error('🚧 Work in progress!');

0 commit comments

Comments
 (0)