extend test
This commit is contained in:
parent
bffead6680
commit
1c9d17263b
1 changed files with 13 additions and 0 deletions
|
@ -6,6 +6,10 @@ import {
|
|||
|
||||
// debugger
|
||||
const commandArgs: Args[] = [
|
||||
{
|
||||
name: 'originalMessage',
|
||||
match: 'content'
|
||||
},
|
||||
{
|
||||
name: 'permaban',
|
||||
match: 'flag',
|
||||
|
@ -31,12 +35,20 @@ const messageArgs1: string[] = [
|
|||
'Skyler'
|
||||
]
|
||||
const expectedResult1 = {
|
||||
originalMessage: [
|
||||
'<@!708544768342229012>',
|
||||
'--permanent',
|
||||
'bye',
|
||||
'bye',
|
||||
'Skyler'
|
||||
],
|
||||
permaban: true,
|
||||
user: '708544768342229012',
|
||||
reason: ['bye', 'bye', 'Skyler']
|
||||
}
|
||||
|
||||
Deno.test({
|
||||
only: false,
|
||||
name: 'parse command arguments 1 (assertEquals)',
|
||||
fn: () => {
|
||||
const result = parseArgs(commandArgs, messageArgs1)
|
||||
|
@ -54,6 +66,7 @@ const messageArgs2: string[] = [
|
|||
'Skyler'
|
||||
]
|
||||
const expectedResult2 = {
|
||||
originalMessage: ['<@!708544768342229012>', 'bye', 'bye', 'Skyler'],
|
||||
permaban: true,
|
||||
user: '708544768342229012',
|
||||
reason: ['bye', 'bye', 'Skyler']
|
||||
|
|
Loading…
Reference in a new issue