fix non-angular promise test
This commit is contained in:
parent
4c5d57fd8c
commit
7e864920b8
15
oauth3.js
15
oauth3.js
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user