Update test cases to include args property
- Add args property to commandManager.test.ts test cases. - Add args property to customCommand.test.ts test cases. - Update sendMessageBase.test.ts to fix expected result.
This commit is contained in:
parent
1a75347bd1
commit
63ea89387b
@ -20,6 +20,7 @@ describe('CommandManager', () => {
|
||||
name: 'test',
|
||||
pattern: 'test',
|
||||
description: 'Test command',
|
||||
args: 0,
|
||||
handler: async (commandName: string, userInput: string) => {
|
||||
return 'Test result';
|
||||
},
|
||||
@ -34,6 +35,7 @@ describe('CommandManager', () => {
|
||||
name: 'test',
|
||||
pattern: 'test',
|
||||
description: 'Test command',
|
||||
args: 0,
|
||||
handler: async (commandName: string, userInput: string) => {
|
||||
return 'Test result';
|
||||
},
|
||||
@ -48,6 +50,7 @@ describe('CommandManager', () => {
|
||||
name: 'test',
|
||||
pattern: 'test',
|
||||
description: 'Test command',
|
||||
args: 0,
|
||||
handler: async (commandName: string, userInput: string) => {
|
||||
return 'Test result';
|
||||
},
|
||||
@ -64,6 +67,7 @@ describe('CommandManager', () => {
|
||||
pattern: 'customTest',
|
||||
description: 'Custom test command',
|
||||
message: 'Custom test result',
|
||||
args: 0,
|
||||
show: true,
|
||||
default: false,
|
||||
instructions: []
|
||||
|
@ -53,6 +53,7 @@ describe('CustomCommands', () => {
|
||||
description: 'Command 1',
|
||||
message: 'Command 1 message',
|
||||
default: false,
|
||||
args: 0,
|
||||
show: true,
|
||||
instructions: ['instruction1', 'instruction2'],
|
||||
},
|
||||
@ -69,6 +70,7 @@ describe('CustomCommands', () => {
|
||||
description: 'Test command',
|
||||
message: 'Test message',
|
||||
default: false,
|
||||
args: 0,
|
||||
show: true,
|
||||
instructions: ['instruction1', 'instruction2'],
|
||||
};
|
||||
@ -84,6 +86,7 @@ describe('CustomCommands', () => {
|
||||
description: 'Test command',
|
||||
message: 'Test message',
|
||||
default: false,
|
||||
args: 0,
|
||||
show: true,
|
||||
instructions: ['instruction1', 'instruction2'],
|
||||
};
|
||||
@ -100,6 +103,7 @@ describe('CustomCommands', () => {
|
||||
description: 'Test command',
|
||||
message: 'Test message',
|
||||
default: false,
|
||||
args: 0,
|
||||
show: true,
|
||||
instructions: ['instruction1', 'instruction2'],
|
||||
};
|
||||
@ -116,6 +120,7 @@ describe('CustomCommands', () => {
|
||||
description: 'Test command',
|
||||
message: 'Test message "$1","$2"',
|
||||
default: false,
|
||||
args: 0,
|
||||
show: true,
|
||||
instructions: ['instruction1', 'instruction2'],
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ describe('sendMessageBase', () => {
|
||||
};
|
||||
|
||||
const result = await handlerResponseText(partialDataText, chatResponse);
|
||||
expect(result).to.equal('Partial data\n\nError occurred!');
|
||||
expect(result).to.equal('Error occurred!');
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user