test: add exception case

This commit is contained in:
H01001000
2022-12-19 13:10:34 +08:00
parent cdb7c97a25
commit b76e8def5b

View File

@@ -95,6 +95,14 @@ ${
return Object.keys(createClientGatewayHandlers({}))[index]
})
.filter((gatewayHandler) => gatewayHandler !== undefined)
.filter(
(gatewayHandler) =>
![
'GUILD_MEMBERS_CHUNK',
'THREAD_LIST_SYNC',
'GUILD_INTEGRATIONS_UPDATE'
].includes(gatewayHandler as string)
)
const getErrorMessage = (): string => `
The following event(s) in createEventHandlers() missing a matching gateway event in createClientGatewayHandlers():
@@ -113,6 +121,7 @@ ${
? missingClientEventEventHandlers.join('\n')
: 'None'
}
`
expect(missingClientEventEventHandlers, getErrorMessage()).to.be.empty