add tests aswell
This commit is contained in:
parent
52ec39a24c
commit
6e084af4a3
1 changed files with 9 additions and 12 deletions
|
@ -43,7 +43,7 @@ const expectedResult1 = {
|
||||||
],
|
],
|
||||||
permaban: true,
|
permaban: true,
|
||||||
user: '708544768342229012',
|
user: '708544768342229012',
|
||||||
reason: ['bye', 'bye', 'Skyler']
|
reason: 'bye bye Skyler'
|
||||||
}
|
}
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
@ -68,7 +68,7 @@ const expectedResult2 = {
|
||||||
originalMessage: ['<@!708544768342229012>', 'bye', 'bye', 'Skyler'],
|
originalMessage: ['<@!708544768342229012>', 'bye', 'bye', 'Skyler'],
|
||||||
permaban: true,
|
permaban: true,
|
||||||
user: '708544768342229012',
|
user: '708544768342229012',
|
||||||
reason: ['bye', 'bye', 'Skyler']
|
reason: 'bye bye Skyler'
|
||||||
}
|
}
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
@ -91,7 +91,7 @@ const messageArgs3: string[] = [
|
||||||
const expectedResult3 = {
|
const expectedResult3 = {
|
||||||
permaban: false,
|
permaban: false,
|
||||||
user: '708544768342229012',
|
user: '708544768342229012',
|
||||||
reason: ['bye', 'bye', 'Skyler']
|
reason: 'bye bye Skyler'
|
||||||
}
|
}
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
@ -105,8 +105,6 @@ Deno.test({
|
||||||
sanitizeExit: true
|
sanitizeExit: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const commandArgs2: Args[] = [
|
const commandArgs2: Args[] = [
|
||||||
{
|
{
|
||||||
name: 'user',
|
name: 'user',
|
||||||
|
@ -118,14 +116,13 @@ const commandArgs2: Args[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'role',
|
name: 'role',
|
||||||
match: 'mentionRole',
|
match: 'mentionRole'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'reason',
|
name: 'reason',
|
||||||
match: 'rest',
|
match: 'rest',
|
||||||
defaultValue: 'ree'
|
defaultValue: 'ree'
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const messageArgs4: string[] = [
|
const messageArgs4: string[] = [
|
||||||
|
@ -135,10 +132,10 @@ const messageArgs4: string[] = [
|
||||||
'<@&836715188690092032>'
|
'<@&836715188690092032>'
|
||||||
]
|
]
|
||||||
const expectedResult4 = {
|
const expectedResult4 = {
|
||||||
channel: "783319033730564098",
|
channel: '783319033730564098',
|
||||||
role: "836715188690092032",
|
role: '836715188690092032',
|
||||||
user: "708544768342229012",
|
user: '708544768342229012',
|
||||||
reason: ["bye"]
|
reason: 'bye'
|
||||||
}
|
}
|
||||||
|
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
Loading…
Reference in a new issue