fix: api tests
This commit is contained in:
@@ -173,18 +173,17 @@ describe('TicTacToe - helper functions', () => {
|
||||
});
|
||||
|
||||
describe('TicTacToe - game flow', () => {
|
||||
it('should have setup and turn commands registered', () => {
|
||||
it('should have turn command registered', () => {
|
||||
const { registry: reg } = createTestContext();
|
||||
|
||||
expect(reg.has('start')).toBe(true);
|
||||
expect(reg.has('turn')).toBe(true);
|
||||
});
|
||||
|
||||
it('should setup board when setup command runs', async () => {
|
||||
it('should setup board when turn command runs', async () => {
|
||||
const { ctx } = createTestContext();
|
||||
|
||||
const promptPromise = waitForPrompt(ctx);
|
||||
const runPromise = ctx.run('start');
|
||||
const runPromise = ctx.run('turn X 1');
|
||||
|
||||
const promptEvent = await promptPromise;
|
||||
expect(promptEvent).not.toBeNull();
|
||||
|
||||
Reference in New Issue
Block a user