-
Notifications
You must be signed in to change notification settings - Fork 5
homework-pengyu #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
well:
|
| @@ -1,12 +1,17 @@ | |||
| import { TestBed } from '@angular/core/testing'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: this file can be removed
| sum_c += counter.num | ||
| }) | ||
| return sum_c; | ||
| // return this.counters.reduce((result, current) => result + current.num, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: remove dead code
| it('should reset all number when call OnResetNumber', () => { | ||
| component.counters = [{num: 1}, {num: 2}]; | ||
| component.onResetNumber(); | ||
| expect(component.counters).toEqual([{num: 0}, {num: 0}]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well: nice to verify counters data when test OnReset
No description provided.