fix non-angular promise test

This commit is contained in:
AJ ONeal 2017-01-20 17:56:30 +00:00
parent 4c5d57fd8c
commit 7e864920b8
1 changed files with 9 additions and 6 deletions

View File

@ -22,20 +22,23 @@
// tests that this promise has all of the necessary api
promise = new PromiseA(function (resolve, reject) {
if (x === 1) {
throw new Error("bad promise, create not asynchronous");
//console.log('x [2]', x);
if (x !== 1) {
throw new Error("bad promise, create not Synchronous [0]");
}
PromiseA.resolve().then(function () {
var promise2;
if (x === 1 || x === 2) {
throw new Error("bad promise, resolve not asynchronous");
//console.log('x resolve', x);
if (x !== 2) {
throw new Error("bad promise, resolve not Asynchronous [1]");
}
promise2 = PromiseA.reject().then(reject, function () {
if (x === 1 || x === 2 || x === 3) {
throw new Error("bad promise, reject not asynchronous");
//console.log('x reject', x);
if (x !== 4) {
throw new Error("bad promise, reject not Asynchronous [2]");
}
if ('undefined' === typeof angular) {