fix: add a file attachment test

This commit is contained in:
Skillz
2023-04-19 13:16:17 -05:00
parent e54f51a7af
commit fbeec8920c
+18
View File
@@ -42,6 +42,24 @@ describe('Send a message', () => {
expect(attachment.filename).to.be.equal('gamer')
})
it ('With a file attachment', async () => {
const txtFile = new Blob(['hello world'], { type: 'text/plain' });
const fileMsg = await rest.sendMessage(e2ecache.channel.id, {
content: '222',
files: [
{
name: 'application.txt',
blob: txtFile,
},
],
});
expect(fileMsg.id).not.equals(undefined);
expect(fileMsg.content).equals('222');
expect(fileMsg.attachments.length).equals(1);
})
})
describe('Manage reactions', async () => {