File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ counter.component.ts
9898
9999``` ts
100100@Component ({
101- selector: ' counter' ,
101+ selector: ' app- counter' ,
102102 template: `
103103 <button (click)="decrement()">-</button>
104104 <span>Current Count: {{ counter }}</span>
@@ -122,7 +122,7 @@ counter.component.spec.ts
122122
123123``` typescript
124124import { render , screen , fireEvent } from ' @testing-library/angular' ;
125- import { CounterComponent } from ' ./counter.component.ts ' ;
125+ import { CounterComponent } from ' ./counter.component' ;
126126
127127describe (' Counter' , () => {
128128 test (' should render counter' , async () => {
@@ -134,7 +134,7 @@ describe('Counter', () => {
134134 test (' should increment the counter on click' , async () => {
135135 await render (CounterComponent , { componentProperties: { counter: 5 } });
136136
137- const incrementButton = screen .getByRole (' button' , { name: / increment / i });
137+ const incrementButton = screen .getByRole (' button' , { name: ' + ' });
138138 fireEvent .click (incrementButton );
139139
140140 expect (screen .getByText (' Current Count: 6' ));
You can’t perform that action at this time.
0 commit comments