Skip to content

Commit 8ccf48f

Browse files
committed
test: fix prune tests
1 parent 18c7eee commit 8ccf48f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/commands/prune.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('prune', () => {
4848

4949
await expect(prune.execute((msg as unknown) as Discord.Message, ['2'])).to.be.fulfilled;
5050
await expect(msg.channel.fetchMessages).to.have.been.calledOnceWithExactly({ limit: 2 });
51-
await expect(messagesCollectionMock.clear).to.have.been.calledOnce;
51+
await expect(msg.channel.bulkDelete).to.have.been.calledOnceWithExactly(messagesCollectionMock);
5252
});
5353

5454
it('should delete itself', async () => {

test/mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const getMessageMock = (name: string, params: any = {}) => {
3939
const mockMessage = {
4040
...params,
4141
channel: {
42+
bulkDelete: Sinon.stub(),
4243
send: Sinon.stub(),
4344
fetchMessages: Sinon.stub(),
4445
type: '',

0 commit comments

Comments
 (0)