import { exhaustiveSwitch, exhaustiveSwitchThrow } from './exhuastiveSwitch'; describe('exhaustiveSwitch', () => { test("causes type error but doesn't throw", () => { expect(() => { exhaustiveSwitch({ // @ts-expect-error switchValue: 'foo', }); }).not.toThrow(); }); }); describe('exhaustiveSwitchThrow', () => { test('causes type error and throws', () => { expect(() => { exhaustiveSwitchThrow({ // @ts-expect-error switchValue: 'foo', }); }).toThrow(); }); });