feat: add rule engine & tic tac toe test
This commit is contained in:
@@ -35,10 +35,10 @@ describe('CommandParser', () => {
|
||||
|
||||
it('should parse command with flag', () => {
|
||||
const result = parser.parse('shuffle discard --seed=2026');
|
||||
|
||||
|
||||
expect(result.commandName).toBe('shuffle');
|
||||
expect(result.args.positional).toEqual(['discard']);
|
||||
expect(result.args.flags).toEqual({ seed: 2026 });
|
||||
expect(result.args.flags).toEqual({ seed: '2026' });
|
||||
});
|
||||
|
||||
it('should parse command with multiple flags', () => {
|
||||
@@ -67,10 +67,10 @@ describe('CommandParser', () => {
|
||||
|
||||
it('should parse command with short flag and value', () => {
|
||||
const result = parser.parse('shuffle d1 --seed=2026');
|
||||
|
||||
|
||||
expect(result.commandName).toBe('shuffle');
|
||||
expect(result.args.positional).toEqual(['d1']);
|
||||
expect(result.args.flags).toEqual({ seed: 2026 });
|
||||
expect(result.args.flags).toEqual({ seed: '2026' });
|
||||
});
|
||||
|
||||
it('should parse command with string number value', () => {
|
||||
|
||||
Reference in New Issue
Block a user