test: fix assert.reject calls

fix tests
This commit is contained in:
Barış Soner Uşaklı
2023-05-04 09:47:58 -04:00
parent 048fbcaac0
commit e0db9a8978
5 changed files with 62 additions and 21 deletions

View File

@@ -605,11 +605,10 @@ describe('Post\'s', () => {
it('should not delete first diff of a post', async () => {
const timestamps = await posts.diffs.list(replyPid);
await assert.rejects(async () => {
await posts.diffs.delete(replyPid, timestamps[0], voterUid);
}, {
message: '[[error:invalid-data]]',
});
await assert.rejects(
posts.diffs.delete(replyPid, timestamps[0], voterUid),
{ message: '[[error:invalid-data]]' }
);
});
it('should delete a post diff', async () => {