Fix breaking change and return rejections to stop exection
All checks were successful
TenorJS-v2 Deploy Automation / build (push) Successful in 5s
All checks were successful
TenorJS-v2 Deploy Automation / build (push) Successful in 5s
This commit is contained in:
parent
86a46e23e7
commit
c84255053d
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tenorjs-v2",
|
"name": "tenorjs-v2",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"description": "A crappy wrapper for Tenor.com API",
|
"description": "A crappy wrapper for Tenor.com API",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -17,7 +17,7 @@ const tests = [
|
|||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('FAIL: Valid API Key --', error.message);
|
console.error('FAIL: Valid API Key --', error.message);
|
||||||
reject();
|
return reject();
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
// Invalid API Key
|
// Invalid API Key
|
||||||
@ -30,7 +30,6 @@ const tests = [
|
|||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('PASS: Invalid API Key --', error.message);
|
console.error('PASS: Invalid API Key --', error.message);
|
||||||
return reject(error);
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
@ -52,12 +51,12 @@ const tests = [
|
|||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
console.error('FAIL: valid query and limit --', 'Unexpected response format'); // Show only the FAIL message
|
console.error('FAIL: valid query and limit --', 'Unexpected response format'); // Show only the FAIL message
|
||||||
reject();
|
return reject();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error('FAIL: valid query and limit --', error.message); // Show only the FAIL message
|
console.error('FAIL: valid query and limit --', error.message); // Show only the FAIL message
|
||||||
reject();
|
return reject();
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user