First round of test
This commit is contained in:
@@ -322,10 +322,10 @@ describe('DirectorsBoard', () => {
|
||||
expect(controller.action).toHaveBeenCalledWith('board', 'u2', 'active', expect.any(String), expect.any(Number));
|
||||
});
|
||||
|
||||
it('clears _undoSnapshot after use (single-step only)', () => {
|
||||
it('clears _undoSnapshot after use (single-step only)', async () => {
|
||||
board._undoSnapshot = new Map([['u1', 'hidden']]);
|
||||
stateStore.getState.mockReturnValue('active');
|
||||
board.undo();
|
||||
await board.undo();
|
||||
expect(board._undoSnapshot).toBeNull();
|
||||
});
|
||||
|
||||
@@ -335,10 +335,10 @@ describe('DirectorsBoard', () => {
|
||||
expect(controller.action).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('second undo is unavailable after first (no-op)', () => {
|
||||
it('second undo is unavailable after first (no-op)', async () => {
|
||||
board._undoSnapshot = new Map([['u1', 'hidden']]);
|
||||
stateStore.getState.mockReturnValue('active');
|
||||
board.undo();
|
||||
await board.undo();
|
||||
board.undo();
|
||||
expect(controller.action).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
@@ -430,10 +430,10 @@ describe('DirectorsBoard spotlight', () => {
|
||||
expect(controller.action).toHaveBeenCalledWith('board', 'u2', 'active', expect.any(String), expect.any(Number));
|
||||
});
|
||||
|
||||
it('clears _spotlightSnapshot after restore', () => {
|
||||
it('clears _spotlightSnapshot after restore', async () => {
|
||||
board._spotlightSnapshot = new Map([['u1', 'active']]);
|
||||
stateStore.getState.mockReturnValue('active');
|
||||
board.restoreSpotlight();
|
||||
await board.restoreSpotlight();
|
||||
expect(board._spotlightSnapshot).toBeNull();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user