Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Merged
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
20 changes: 20 additions & 0 deletions test/common/Promise.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,26 @@ describe(
});
});

it('should resolve with the sync then operation', () => {
queueZone.run(() => {
let value = null;
const p1 = {
then: function(thenCallback: Function) {
return thenCallback('p1');
}
};
const p2 = {
then: function(thenCallback: Function) {
return thenCallback('p2');
}
};
Promise.all([p1, 'v1', p2]).then((v: any) => value = v);
// expect(Zone.current.get('queue').length).toEqual(2);
flushMicrotasks();
expect(value).toEqual(['p1', 'v1', 'p2']);
});
});

it('should resolve generators',
ifEnvSupports(
() => {
Expand Down