Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should run emit task complete events when "run-all-prerender" resolves', done => {
runAll.mockImplementation(() => Promise.resolve());
let i = 0;
const expected = [
{
task: tasks[0],
type: AffectedEventType.TaskComplete,
success: true
},
{
task: tasks[1],
type: AffectedEventType.TaskComplete,
success: true
}
];
defaultTaskRunner(tasks, {}, context).subscribe({
next: event => {
expect(event).toEqual(expected[i++]);