feat: add rule engine & tic tac toe test

This commit is contained in:
hyper
2026-03-31 18:20:18 +08:00
parent d27948fbfc
commit d0d051f547
11 changed files with 2559 additions and 4 deletions
+4 -4
View File
@@ -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', () => {