Fix breaking change and return rejections to stop exection
All checks were successful
TenorJS-v2 Deploy Automation / build (push) Successful in 5s

This commit is contained in:
Skylar Grant 2024-09-22 20:05:24 -04:00
parent 86a46e23e7
commit c84255053d
2 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "tenorjs-v2",
"version": "1.0.5",
"version": "1.0.6",
"description": "A crappy wrapper for Tenor.com API",
"main": "./src/index.js",
"scripts": {

View File

@ -17,7 +17,7 @@ const tests = [
})
.catch((error) => {
console.error('FAIL: Valid API Key --', error.message);
reject();
return reject();
});
}),
// Invalid API Key
@ -30,7 +30,6 @@ const tests = [
})
.catch((error) => {
console.error('PASS: Invalid API Key --', error.message);
return reject(error);
resolve();
});
}),
@ -52,12 +51,12 @@ const tests = [
resolve();
} else {
console.error('FAIL: valid query and limit --', 'Unexpected response format'); // Show only the FAIL message
reject();
return reject();
}
})
.catch((error) => {
console.error('FAIL: valid query and limit --', error.message); // Show only the FAIL message
reject();
return reject();
});
})
];