fix: more tests
This commit is contained in:
@@ -136,9 +136,12 @@ describe('createGameCommand', () => {
|
||||
describe('createPromptDef', () => {
|
||||
it('should create a PromptDef with string schema', () => {
|
||||
const promptDef = createPromptDef<[string, number]>('play <player> <score:number>');
|
||||
|
||||
|
||||
expect(promptDef).toBeDefined();
|
||||
expect(promptDef.schema).toBe('play <player> <score:number>');
|
||||
expect(promptDef.schema.name).toBe('play');
|
||||
expect(promptDef.schema.params).toHaveLength(2);
|
||||
expect(promptDef.schema.params[0].name).toBe('player');
|
||||
expect(promptDef.schema.params[1].name).toBe('score');
|
||||
});
|
||||
|
||||
it('should create a PromptDef with CommandSchema object', () => {
|
||||
|
||||
Reference in New Issue
Block a user