Skip to content

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

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