-
Notifications
You must be signed in to change notification settings - Fork 38
Abi matthews gordon assignment #15
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?
Abi matthews gordon assignment #15
Conversation
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.
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); |
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.
Expected text to be "Maths paper marked"
setTimeout(() => resolve("Math paper marked"), 2000); | |
setTimeout(() => resolve("Maths paper marked"), 2000); |
|
||
if(paper.wasSubmitted){ | ||
|
||
paper.markPaper(); |
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.
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.
paper.markPaper(); | |
await paper.markPaper(); |
constructor(wheels, bodyType) { | ||
this.wheels = wheels; | ||
this.bodyType = bodyType; | ||
} |
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.
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.
Assignment Complete.