import { describe, expect, it } from 'vitest'; import { matchAppRoute } from './appRoutes'; describe('matchAppRoute', () => { it('routes the main app by default', () => { expect(matchAppRoute('/')).toEqual({ kind: 'game', }); }); it('routes puzzle playground path to the standalone puzzle runtime', () => { expect(matchAppRoute('/puzzle')).toEqual({ kind: 'puzzle-playground', }); }); it('routes big fish playground path to the standalone big fish runtime', () => { expect(matchAppRoute('/BIG-FISH/')).toEqual({ kind: 'big-fish-playground', }); }); it('routes former standalone editor paths back to the main game', () => { expect(matchAppRoute('/item-editor/tools')).toEqual({ kind: 'game', }); expect(matchAppRoute('/behavior-editor')).toEqual({ kind: 'game', }); expect(matchAppRoute('/NPC-EDITOR/profiles/')).toEqual({ kind: 'game', }); }); it('does not treat unrelated prefixes as preset editor routes', () => { expect(matchAppRoute('/npc-editorial')).toEqual({ kind: 'game', }); }); });