Skip to content

exercise 6 completed #20

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 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions mark-anthony-jones-assignment/06/exercise.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ describe('06', () => {
setTimeout(()=>{
resolve('Maths paper marked');
}, 2000)
}).then(()=>{
console.log("Maths paper marked")
})
}
},
Expand All @@ -28,8 +26,6 @@ describe('06', () => {
setTimeout(()=>{
resolve('Geology paper marked');
}, 2000)
}).then(()=>{
console.log("Geology paper marked")
})
}
},
Expand All @@ -43,8 +39,6 @@ describe('06', () => {
setTimeout(()=>{
resolve('Social Studies paper marked');
}, 2000)
}).then(()=>{
console.log("Social Studies paper marked")
})

}
Expand All @@ -55,6 +49,11 @@ describe('06', () => {
const spyOnLog = vi.spyOn(console, 'log');

// Your code here
for await(const paper of listOfPapers){
if(paper.wasSubmitted === true){
return paper.markPaper()
}
}


expect(spyOnLog).toHaveBeenCalledWith("Maths paper marked");
Expand Down