Skip to content

Commit

Permalink
cov for handleNonExhaustiveSwitch
Browse files Browse the repository at this point in the history
  • Loading branch information
virgilchiriac committed Jun 13, 2024
1 parent ada3dc3 commit 18a6a8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/server/src/modules/board/domain/type-mapping.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getBoardNodeType } from './type-mapping';
import { getBoardNodeType, handleNonExhaustiveSwitch } from './type-mapping';

import { BoardNodeType } from './types/board-node-type.enum';

Expand Down Expand Up @@ -44,3 +44,9 @@ describe('getBoardNodeType', () => {
expect(() => getBoardNodeType(new UnknownType() as any)).toThrow();
});
});

describe('handleNonExhaustiveSwitch', () => {
it('should throw error', () => {
expect(() => handleNonExhaustiveSwitch('unknown' as never)).toThrow();
});
});

0 comments on commit 18a6a8e

Please sign in to comment.