Skip to content

Conversation

@Pho3nyxX
Copy link

Assignment Complete.

Copy link
Contributor

@dimitriharding dimitriharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the comments to understand where changes are needed.

// and print "Maths paper marked"
return new Promise((resolve, reject) => {

setTimeout(() => resolve("Math paper marked"), 2000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected text to be "Maths paper marked"

Suggested change
setTimeout(() => resolve("Math paper marked"), 2000);
setTimeout(() => resolve("Maths paper marked"), 2000);


if(paper.wasSubmitted){

paper.markPaper();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected you to use the await keyword so that way, the execution would have waited for your promise to be resolved rather than for you to update the test cases to use setTimeout before checking the results.

Suggested change
paper.markPaper();
await paper.markPaper();

constructor(wheels, bodyType) {
this.wheels = wheels;
this.bodyType = bodyType;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classes allow us to reuse code, so you were expected to define the whatIsMyName method on the Vehicle class so all child classes would automatically have the same method rather than you defining it on each class.

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.

2 participants