Skip to content
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