Skip to content

Commit cee9d40

Browse files
committed
test fixes
1 parent c25cf68 commit cee9d40

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/version2/issueAttachments.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ export class IssueAttachments {
398398
method: 'POST',
399399
headers: {
400400
'X-Atlassian-Token': 'no-check',
401-
'Content-Type': 'multipart/form-data',
402401
},
403402
body: formDataService.formData,
404403
// maxBodyLength: Infinity, // todo needed?

tests/integration/version2/issueAttachments.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('IssueAttachments', () => {
104104
expect(attachments[0].mimeType).toBe(customMimeType);
105105
});
106106

107-
test.sequential.skip('should add attachment with fs.createReadStream', async ({ expect }) => {
107+
test.sequential('should add attachment with fs.createReadStream', async ({ expect }) => {
108108
const customMimeType = 'application/typescript';
109109
const fileStream = await open('./tests/integration/version2/issueAttachments.test.ts');
110110

@@ -123,9 +123,10 @@ describe('IssueAttachments', () => {
123123
});
124124

125125
test.sequential('should getAttachmentContent', async ({ expect }) => {
126-
const content = await client.issueAttachments.getAttachmentContent({ id: attachments[0].id });
126+
const { content, contentType } = await client.issueAttachments.getAttachmentContent({ id: attachments[0].id });
127127

128-
expect(Buffer.isBuffer(content)).toBeTruthy();
128+
expect(ArrayBuffer.isView(content) || content instanceof ArrayBuffer).toBeTruthy();
129+
expect(['text/plain', 'video/mp2t'].includes(contentType)).toBeTruthy();
129130
});
130131

131132
test.sequential('should remove attachment', async () => {

0 commit comments

Comments
 (0)