WIP: Give warn command snapshots names
All checks were successful
Test / build (push) Successful in 15s

This commit is contained in:
Ethan Lane 2024-06-28 18:24:17 +01:00
parent 42ec4a99db
commit 97bd3d675b
2 changed files with 17 additions and 17 deletions

View file

@ -1,6 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Execute EXPECT user to be warned 1`] = ` exports[`Execute EXPECT user to be warned: savedAudit 1`] = `
{
"AuditId": Any<String>,
"AuditType": 1,
"Id": Any<String>,
"ModeratorId": "moderatorId",
"Reason": "Test reason",
"ServerId": "guildId",
"UserId": "userId",
"WhenCreated": Any<Date>,
"WhenUpdated": Any<Date>,
}
`;
exports[`Execute EXPECT user to be warned: sentEmbeds 1`] = `
[ [
{ {
"color": 3166394, "color": 3166394,
@ -22,17 +36,3 @@ exports[`Execute EXPECT user to be warned 1`] = `
}, },
] ]
`; `;
exports[`Execute EXPECT user to be warned 2`] = `
{
"AuditId": Any<String>,
"AuditType": 1,
"Id": Any<String>,
"ModeratorId": "moderatorId",
"Reason": "Test reason",
"ServerId": "guildId",
"UserId": "userId",
"WhenCreated": Any<Date>,
"WhenUpdated": Any<Date>,
}
`;

View file

@ -108,7 +108,7 @@ describe('Execute', () => {
expect(logChannel.send).toHaveBeenCalledTimes(1); expect(logChannel.send).toHaveBeenCalledTimes(1);
expect(sentEmbeds).toBeDefined(); expect(sentEmbeds).toBeDefined();
expect(sentEmbeds).toMatchSnapshot(); expect(sentEmbeds).toMatchSnapshot("sentEmbeds");
expect(Audit.prototype.Save).toHaveBeenCalledWith(Audit, expect.any(Audit)); expect(Audit.prototype.Save).toHaveBeenCalledWith(Audit, expect.any(Audit));
@ -117,7 +117,7 @@ describe('Execute', () => {
AuditId: expect.any(String), AuditId: expect.any(String),
WhenCreated: expect.any(Date), WhenCreated: expect.any(Date),
WhenUpdated: expect.any(Date) WhenUpdated: expect.any(Date)
}); }, "savedAudit");
}); });
test.todo("GIVEN interaction.guild is null, EXPECT nothing to happen"); test.todo("GIVEN interaction.guild is null, EXPECT nothing to happen");