-
Notifications
You must be signed in to change notification settings - Fork 8
Add to the api mock a fake method that will load the evaluation based on the id #146
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: master
Are you sure you want to change the base?
Conversation
src/rest-api/trainer/trainerApi.ts
Outdated
| public getExerciseEvaluationById(id: number): Promise<ExerciseEvaluation> { | ||
| let evaluation: ExerciseEvaluation; | ||
|
|
||
| const evaluationData = exerciseEvaluationMockedData.filter((evaluationItem) => { |
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.
Instead of use filter you can use find to get the first item that satisfies the condition
| it('returns expected Exercise Evaluation by id equals 1', sinon.test((done) => { | ||
| // Arrange | ||
| const sinon: sinon.SinonStatic = this; | ||
|
|
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.
Are these line breaks between constant declarations a coding guideline? I would remove them...
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.
The linter rule we are using forbids adding more than two consecutive blank lines, in this case I would put together all the const statements
|
Hi @jecaestevez when do you think you can apply the feedback from the pull? I think it would be a good idea to get this branch fine merge it, and then let you start working on the next subcase. What do you think? |
|
Today I'll do a pull requested with the code review and other sub cases.
…On Sun, 9 Jul 2017 at 10:17, Braulio Diez ***@***.***> wrote:
Hi @jecaestevez <https://github.com/jecaestevez> when do you think you
can apply the feedback from the pull? I think it would be a good idea to
get this branch fine merge it, and then let you start working on the next
subcase. What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABv42N-OnQ-sqnbmY3LNQxpIqfn9KNPlks5sMIx7gaJpZM4OInA0>
.
|
|
I've uploaded the code review changes and other small subcase |
…to filter and formatting styles. Added Save exercise evaluation method. Fixed a type
No description provided.