Skip to content

Commit

Permalink
Add tests 🙈
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored Apr 10, 2022
1 parent 7976840 commit e68fe42
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018
ecmaVersion: 2020
},
ignorePatterns: ['assets/', 'dist/', 'node_modules/'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/bitbucket_cloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class BitbucketCloud {
// from BitBucket API responses: `{"error": {"message": "Error message"}}` and
// `{"error": "Error message"}`, apart from plain text responses like `Bad Request`.
const error =
responseBody.error.message || responseBody.error || responseBody;
responseBody?.error?.message || responseBody?.error || responseBody;
throw new Error(`${response.statusText} ${error}`.trim());
}

Expand Down
6 changes: 3 additions & 3 deletions src/drivers/bitbucket_cloud.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ describe('Non Enviromental tests', () => {

test('Publish', async () => {
const path = `${__dirname}/../../assets/logo.png`;
await expect(client.upload({ path })).rejects.toThrow(
'Bitbucket Cloud does not support upload!'
);
const { uri } = await client.upload({ path });

expect(uri).not.toBeUndefined();
});

test('Runner token', async () => {
Expand Down

0 comments on commit e68fe42

Please sign in to comment.