Skip to content

Commit ce63573

Browse files
committed
test: ✅ rename renderComponent to mountXXX
1 parent cde8023 commit ce63573

File tree

75 files changed

+280
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+280
-280
lines changed

apps/302-recipe-search-integration-test-bed-solution/src/app/recipe/recipe-search.integration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import { RecipeSearch } from './recipe-search.ng';
99

1010
describe(RecipeSearch.name, () => {
1111
it('searches recipes without filtering', async () => {
12-
const { getRecipeNames } = await renderComponent();
12+
const { getRecipeNames } = await mountRecipeSearch();
1313

1414
expect(getRecipeNames()).toEqual(['Burger', 'Salad']);
1515
});
1616

17-
async function renderComponent() {
17+
async function mountRecipeSearch() {
1818
TestBed.configureTestingModule({
1919
providers: [provideRecipeRepositoryFake()],
2020
});

apps/302-recipe-search-integration-test-bed-starter/src/app/recipe/recipe-search.integration.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { RecipeSearch } from './recipe-search.ng';
44
describe(RecipeSearch.name, () => {
55
it.todo('🚧 should search recipes without filtering');
66

7-
async function renderComponent() {
7+
async function mountRecipeSearch() {
88
const fixture = TestBed.createComponent(RecipeSearch);
99
await fixture.whenStable();
1010

apps/302-recipe-search-integration-testing-library-solution/src/app/recipe/recipe-search.integration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import { RecipeSearch } from './recipe-search.ng';
88

99
describe(RecipeSearch.name, () => {
1010
it('searches recipes without filtering', async () => {
11-
const { getRecipeNameEls } = await renderComponent();
11+
const { getRecipeNameEls } = await mountRecipeSearch();
1212

1313
expect(getRecipeNameEls()).toHaveLength(2);
1414
expect(getRecipeNameEls()[0]).toHaveTextContent('Burger');
1515
expect(getRecipeNameEls()[1]).toHaveTextContent('Salad');
1616
});
1717

18-
async function renderComponent() {
18+
async function mountRecipeSearch() {
1919
const { fixture } = await render(RecipeSearch, {
2020
providers: [provideRecipeRepositoryFake()],
2121
configureTestBed(testBed) {

apps/302-recipe-search-integration-testing-library-starter/src/app/recipe/recipe-search.integration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import { RecipeSearch } from './recipe-search.ng';
99

1010
describe(RecipeSearch.name, () => {
1111
it('searches recipes without filtering', async () => {
12-
const { getRecipeNames } = await renderComponent();
12+
const { getRecipeNames } = await mountRecipeSearch();
1313

1414
expect(getRecipeNames()).toEqual(['Burger', 'Salad']);
1515
});
1616

17-
async function renderComponent() {
17+
async function mountRecipeSearch() {
1818
TestBed.configureTestingModule({
1919
providers: [provideRecipeRepositoryFake()],
2020
});

apps/303-recipe-search-shallow-test-bed-solution/src/app/recipe/recipe-search.integration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import { RecipeSearch } from './recipe-search.ng';
88

99
describe(RecipeSearch.name, () => {
1010
it('searches recipes without filtering', async () => {
11-
const { getRecipeNameEls } = await renderComponent();
11+
const { getRecipeNameEls } = await mountRecipeSearch();
1212

1313
expect(getRecipeNameEls()).toHaveLength(2);
1414
expect(getRecipeNameEls()[0]).toHaveTextContent('Burger');
1515
expect(getRecipeNameEls()[1]).toHaveTextContent('Salad');
1616
});
1717

18-
async function renderComponent() {
18+
async function mountRecipeSearch() {
1919
const { fixture } = await render(RecipeSearch, {
2020
providers: [provideRecipeRepositoryFake()],
2121
configureTestBed(testBed) {

apps/303-recipe-search-shallow-test-bed-solution/src/app/recipe/recipe-search.shallow.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { RecipeSearch } from './recipe-search.ng';
1010

1111
describe(RecipeSearch.name, () => {
1212
it('searches recipes without filtering', async () => {
13-
const { getRecipeNames } = await renderComponent();
13+
const { getRecipeNames } = await mountRecipeSearch();
1414

1515
expect(getRecipeNames()).toEqual(['Burger', 'Salad']);
1616
});
1717

18-
async function renderComponent() {
18+
async function mountRecipeSearch() {
1919
TestBed.configureTestingModule({
2020
providers: [provideRecipeRepositoryFake()],
2121
});

apps/303-recipe-search-shallow-test-bed-starter/src/app/recipe/recipe-search.integration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import { RecipeSearch } from './recipe-search.ng';
88

99
describe(RecipeSearch.name, () => {
1010
it('searches recipes without filtering', async () => {
11-
const { getRecipeNameEls } = await renderComponent();
11+
const { getRecipeNameEls } = await mountRecipeSearch();
1212

1313
expect(getRecipeNameEls()).toHaveLength(2);
1414
expect(getRecipeNameEls()[0]).toHaveTextContent('Burger');
1515
expect(getRecipeNameEls()[1]).toHaveTextContent('Salad');
1616
});
1717

18-
async function renderComponent() {
18+
async function mountRecipeSearch() {
1919
const { fixture } = await render(RecipeSearch, {
2020
providers: [provideRecipeRepositoryFake()],
2121
configureTestBed(testBed) {

apps/303-recipe-search-shallow-test-bed-starter/src/app/recipe/recipe-search.shallow.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { RecipeSearch } from './recipe-search.ng';
99
describe(RecipeSearch.name, () => {
1010
it.todo('🚧 should search recipes without filtering');
1111

12-
async function renderComponent() {
12+
async function mountRecipeSearch() {
1313
TestBed.configureTestingModule({
1414
providers: [provideRecipeRepositoryFake()],
1515
});

apps/303-recipe-search-shallow-testing-library-solution/src/app/recipe/recipe-search.integration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import { RecipeSearch } from './recipe-search.ng';
88

99
describe(RecipeSearch.name, () => {
1010
it('searches recipes without filtering', async () => {
11-
const { getRecipeNameEls } = await renderComponent();
11+
const { getRecipeNameEls } = await mountRecipeSearch();
1212

1313
expect(getRecipeNameEls()).toHaveLength(2);
1414
expect(getRecipeNameEls()[0]).toHaveTextContent('Burger');
1515
expect(getRecipeNameEls()[1]).toHaveTextContent('Salad');
1616
});
1717

18-
async function renderComponent() {
18+
async function mountRecipeSearch() {
1919
const { fixture } = await render(RecipeSearch, {
2020
providers: [provideRecipeRepositoryFake()],
2121
configureTestBed(testBed) {

apps/303-recipe-search-shallow-testing-library-solution/src/app/recipe/recipe-search.shallow.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { RecipeSearch } from './recipe-search.ng';
1010

1111
describe(RecipeSearch.name, () => {
1212
it('searches recipes without filtering', async () => {
13-
const { getRecipeNames } = await renderComponent();
13+
const { getRecipeNames } = await mountRecipeSearch();
1414

1515
expect(getRecipeNames()).toEqual(['Burger', 'Salad']);
1616
});
1717

18-
async function renderComponent() {
18+
async function mountRecipeSearch() {
1919
const { debugElement, fixture } = await render(RecipeSearch, {
2020
providers: [provideRecipeRepositoryFake()],
2121
configureTestBed(testBed) {

0 commit comments

Comments
 (0)