feat: publish CodexPi contest snapshot
Some checks are pending
Qualité / tests (push) Waiting to run
Some checks are pending
Qualité / tests (push) Waiting to run
This commit is contained in:
18
frontend/tests/appRoutes.test.ts
Normal file
18
frontend/tests/appRoutes.test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import test from 'node:test'
|
||||
|
||||
import { routeHref, routeView } from '../src/appRoutes.ts'
|
||||
|
||||
test('deep links restore the requested view',()=>{
|
||||
assert.equal(routeView('?view=activity'),'activity')
|
||||
assert.equal(routeView('?view=workspace&project=p1&conversation=c1'),'workspace')
|
||||
assert.equal(routeView('?view=unknown'),'company')
|
||||
})
|
||||
|
||||
test('workspace links retain their project, conversation and tab',()=>{
|
||||
assert.equal(routeHref('workspace',{project:{id:'p1'},conversationId:'c1',tab:'changes'}),'/?view=workspace&project=p1&conversation=c1&tab=changes')
|
||||
})
|
||||
|
||||
test('global machine links do not depend on a selected project',()=>{
|
||||
assert.equal(routeHref('remote',{project:{id:'p1'}}),'/?view=remote')
|
||||
})
|
||||
Reference in New Issue
Block a user