Skip to content

Conversation

@jecaestevez
Copy link
Collaborator

No description provided.

public getExerciseEvaluationById(id: number): Promise<ExerciseEvaluation> {
let evaluation: ExerciseEvaluation;

const evaluationData = exerciseEvaluationMockedData.filter((evaluationItem) => {
Copy link
Member

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

@brauliodiez
Copy link
Member

Looks ok, only just missing the feedback from @nasdan. About testing the mocking api is more an excercise, this won't be used in the real app but is a good chance to get started with testing, please give me a shout whenever you made the change proposed by @nasdan and I will proceed with the merge.

it('returns expected Exercise Evaluation by id equals 1', sinon.test((done) => {
// Arrange
const sinon: sinon.SinonStatic = this;

Copy link

@RosanaRufer RosanaRufer Jul 1, 2017

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...

Copy link
Member

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

@brauliodiez
Copy link
Member

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?

@jecaestevez
Copy link
Collaborator Author

jecaestevez commented Jul 9, 2017 via email

@jecaestevez
Copy link
Collaborator Author

I've uploaded the code review changes and other small subcase

…to filter and formatting styles.

Added Save exercise evaluation method.
Fixed a type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants