MCPcopy
hub / github.com/angular/angular / testPromiseSubClass

Function testPromiseSubClass

packages/zone.js/test/common/Promise.spec.ts:634–647  ·  view source on GitHub ↗
(done?: Function)

Source from the content-addressed store, hash-verified

632 });
633
634 function testPromiseSubClass(done?: Function) {
635 const myPromise = new MyPromise(function (resolve: any, reject: Function) {
636 resolve('foo');
637 });
638
639 return Promise.resolve()
640 .then(function () {
641 return myPromise;
642 })
643 .then(function (result) {
644 expect(result).toBe('foo');
645 done && done();
646 });
647 }
648
649 it(
650 'should resolve if the Promise subclass resolves',

Callers 1

Promise.spec.tsFile · 0.85

Calls 3

thenMethod · 0.65
resolveMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…