Skip to content

Commit

Permalink
2.0.6 (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring authored Apr 1, 2021
1 parent b07f39f commit 119dd30
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Jira.js changelog

### 2.0.6

- searchForIssuesUsingJql request fixed

### 2.0.5

- addAttachment fixed for browsers
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jira.js",
"version": "2.0.5",
"version": "2.0.6",
"main": "out/index.js",
"types": "out/index.d.ts",
"repository": "https://github.com/MrRefactoring/jira.js.git",
Expand Down
6 changes: 3 additions & 3 deletions src/clients/baseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class BaseClient implements Client {
constructor(protected readonly config: Config) {
this.telemetryClient = new TelemetryClient(config.telemetry);
this.instance = axios.create({
paramsSerializer: this.paramSerializer,
paramsSerializer: this.paramSerializer.bind(this),
...config.baseRequestConfig,
baseURL: config.host,
headers: this.removeUndefinedProperties({
Expand Down Expand Up @@ -84,8 +84,8 @@ export class BaseClient implements Client {
bodyExists: !!requestConfig.data,
callbackUsed: !!callback,
headersExists: !!requestConfig.headers,
libVersion: '2.0.5',
libVersionHash: 'b559db93c279b7e4886705cb45f7ca9c',
libVersion: '2.0.6',
libVersionHash: '001a249da602f82e2d14784bf74be8fa',
methodName: telemetryData?.methodName || 'sendRequest',
onErrorMiddlewareUsed: !!this.config.middlewares?.onError,
onResponseMiddlewareUsed: !!this.config.middlewares?.onResponse,
Expand Down
25 changes: 25 additions & 0 deletions tests/system/version2/issueSearch.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { prepareEnvironment } from '../utils/prepareEnvironment';
import { cleanupEnvironment } from '../utils/cleanupEnvironment';
import { getVersion2Client } from '../utils/getClient';

describe('System tests. IssueSearch', () => {
beforeAll(async () => {
await prepareEnvironment();
});

afterAll(async () => {
await cleanupEnvironment();
});

it('searchForIssuesUsingJql should correctly calls', async () => {
const client = getVersion2Client({ noCheckAtlassianToken: true });

const issues = await client.issueSearch.searchForIssuesUsingJql({
jql: 'assignee=currentuser()',
});

expect(issues.startAt).toBe(0);
expect(issues.maxResults).toBe(50);
expect(issues.issues).toEqual([]);
});
});
25 changes: 25 additions & 0 deletions tests/system/version3/issueSearch.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { prepareEnvironment } from '../utils/prepareEnvironment';
import { cleanupEnvironment } from '../utils/cleanupEnvironment';
import { getVersion3Client } from '../utils/getClient';

describe('System tests. IssueSearch', () => {
beforeAll(async () => {
await prepareEnvironment();
});

afterAll(async () => {
await cleanupEnvironment();
});

it('searchForIssuesUsingJql should correctly calls', async () => {
const client = getVersion3Client({ noCheckAtlassianToken: true });

const issues = await client.issueSearch.searchForIssuesUsingJql({
jql: 'assignee=currentuser()',
});

expect(issues.startAt).toBe(0);
expect(issues.maxResults).toBe(50);
expect(issues.issues).toEqual([]);
});
});

0 comments on commit 119dd30

Please sign in to comment.