Skip to content

asapScheduler: Scheduling inside of an executing action only works once #7196

@benlesh

Description

@benlesh

Originally reported here: #6747 (comment)

Failing test:

  it('scheduling inside of an executing action more than once should work', (done) => {
    const results: any[] = [];

    asapScheduler.schedule(() => {
      results.push(1)
      asapScheduler.schedule(() => results.push(2));
      asapScheduler.schedule(() => results.push(3));
    });

    setTimeout(() => {
      // This should always fire after two recursively scheduled microtasks.
      expect(results).to.deep.equal([1, 2, 3]);
      done() 
    })
  })

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions