import { describe, it, expect } from 'vitest'; import { stripDevParams } from './dev-params'; describe('stripDevParams (WP-37)', () => { it('removes ?scenario and ?role so the stored dev value wins on reload', () => { expect(stripDevParams('http://localhost:4200/dashboard?scenario=slow&role=admin')).toBe( 'http://localhost:4200/dashboard', ); }); it('keeps unrelated query params and the path/hash', () => { expect(stripDevParams('http://localhost:4200/beheer/zaken?scenario=error&tab=2#top')).toBe( 'http://localhost:4200/beheer/zaken?tab=2#top', ); }); it('is a no-op when neither param is present', () => { expect(stripDevParams('http://localhost:4200/dashboard')).toBe( 'http://localhost:4200/dashboard', ); }); });