Skip to content

Commit ad67fc4

Browse files
committed
test: update deprecated componentInputs -> inputs
1 parent d5df601 commit ad67fc4

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

apps/example-app/src/app/examples/02-input-output.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test('is possible to set input and listen for output', async () => {
88
const sendValue = jest.fn();
99

1010
await render(InputOutputComponent, {
11-
componentInputs: {
11+
inputs: {
1212
value: 47,
1313
},
1414
on: {
@@ -64,7 +64,7 @@ test('is possible to set input and listen for output (deprecated)', async () =>
6464
const sendValue = jest.fn();
6565

6666
await render(InputOutputComponent, {
67-
componentInputs: {
67+
inputs: {
6868
value: 47,
6969
},
7070
componentOutputs: {

projects/testing-library/tests/integrations/ng-mocks.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { NgIf } from '@angular/common';
88
test('sends the correct value to the child input', async () => {
99
const utils = await render(TargetComponent, {
1010
imports: [MockComponent(ChildComponent)],
11-
componentInputs: { value: 'foo' },
11+
inputs: { value: 'foo' },
1212
});
1313

1414
const children = utils.fixture.debugElement.queryAll(By.directive(ChildComponent));
@@ -21,7 +21,7 @@ test('sends the correct value to the child input', async () => {
2121
test('sends the correct value to the child input 2', async () => {
2222
const utils = await render(TargetComponent, {
2323
imports: [MockComponent(ChildComponent)],
24-
componentInputs: { value: 'bar' },
24+
inputs: { value: 'bar' },
2525
});
2626

2727
const children = utils.fixture.debugElement.queryAll(By.directive(ChildComponent));

projects/testing-library/tests/rerender.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test('rerenders the component with updated inputs', async () => {
4343
expect(screen.getByText('Sarah')).toBeInTheDocument();
4444

4545
const firstName = 'Mark';
46-
await rerender({ componentInputs: { firstName } });
46+
await rerender({ inputs: { firstName } });
4747

4848
expect(screen.getByText(firstName)).toBeInTheDocument();
4949
});
@@ -52,7 +52,7 @@ test('rerenders the component with updated inputs and resets other props', async
5252
const firstName = 'Mark';
5353
const lastName = 'Peeters';
5454
const { rerender } = await render(FixtureComponent, {
55-
componentInputs: {
55+
inputs: {
5656
firstName,
5757
lastName,
5858
},
@@ -61,7 +61,7 @@ test('rerenders the component with updated inputs and resets other props', async
6161
expect(screen.getByText(`${firstName} ${lastName}`)).toBeInTheDocument();
6262

6363
const firstName2 = 'Chris';
64-
await rerender({ componentInputs: { firstName: firstName2 } });
64+
await rerender({ inputs: { firstName: firstName2 } });
6565

6666
expect(screen.getByText(firstName2)).toBeInTheDocument();
6767
expect(screen.queryByText(firstName)).not.toBeInTheDocument();
@@ -87,7 +87,7 @@ test('rerenders the component with updated inputs and keeps other props when par
8787
const firstName = 'Mark';
8888
const lastName = 'Peeters';
8989
const { rerender } = await render(FixtureComponent, {
90-
componentInputs: {
90+
inputs: {
9191
firstName,
9292
lastName,
9393
},
@@ -96,7 +96,7 @@ test('rerenders the component with updated inputs and keeps other props when par
9696
expect(screen.getByText(`${firstName} ${lastName}`)).toBeInTheDocument();
9797

9898
const firstName2 = 'Chris';
99-
await rerender({ componentInputs: { firstName: firstName2 }, partialUpdate: true });
99+
await rerender({ inputs: { firstName: firstName2 }, partialUpdate: true });
100100

101101
expect(screen.queryByText(firstName)).not.toBeInTheDocument();
102102
expect(screen.getByText(`${firstName2} ${lastName}`)).toBeInTheDocument();
@@ -181,7 +181,7 @@ test('change detection gets not called if `detectChangesOnRender` is set to fals
181181
expect(screen.getByText('Sarah')).toBeInTheDocument();
182182

183183
const firstName = 'Mark';
184-
await rerender({ componentInputs: { firstName }, detectChangesOnRender: false });
184+
await rerender({ inputs: { firstName }, detectChangesOnRender: false });
185185

186186
expect(screen.getByText('Sarah')).toBeInTheDocument();
187187
expect(screen.queryByText(firstName)).not.toBeInTheDocument();

0 commit comments

Comments
 (0)