1 parent
a8f689e39c
commit
c340aec110
59 files changed
+1108
-1590
No files matched your search
@@ -72,7 +72,7 @@ function makeContext({ installSection = true, update = true } = {}) {
|
||||
test('installs its settings section under its own namespace', () => {
|
||||
const { ctx, seen } = makeContext()
|
||||
apply(ctx)
|
||||
assert.equal(seen.installed.ns, 'geek2api')
|
||||
assert.equal(seen.installed.ns, 'infstarapi')
|
||||
assert.ok('apiHosts' in seen.installed.entry)
|
||||
assert.ok('claudeRuntime' in seen.installed.entry)
|
||||
assert.equal(typeof seen.installed.hooks.setSource, 'function')
|
||||
@@ -100,7 +100,7 @@ test('the settings source drives the host list and Claude runtime, and writes go
|
||||
// Unusable entries are dropped and the order kept; an empty list restores the defaults.
|
||||
const updated = await seen.handler('hosts/update', { apiHosts: ['https://other.example//', 'not a url', 'https://b.example'] })
|
||||
assert.equal(updated.ok, true)
|
||||
assert.deepEqual(seen.updates[0], { ns: 'geek2api', patch: { apiHosts: ['https://other.example', 'https://b.example'] } })
|
||||
assert.deepEqual(seen.updates[0], { ns: 'infstarapi', patch: { apiHosts: ['https://other.example', 'https://b.example'] } })
|
||||
await seen.handler('hosts/update', { apiHosts: [] })
|
||||
assert.deepEqual(seen.updates[1].patch, { apiHosts: [...DEFAULT_API_HOSTS] })
|
||||
|
||||
@@ -135,5 +135,5 @@ test('a profile without a settings provider still serves its route', () => {
|
||||
assert.equal(seen.installed, undefined)
|
||||
assert.equal(seen.adapters.length, 1)
|
||||
assert.deepEqual(seen.injected, [['settings'], ['web'], ['connection', 'webServer'], ['tools']])
|
||||
assert.equal(seen.channel, '/geek2api')
|
||||
assert.equal(seen.channel, '/infstarapi')
|
||||
})
|
||||
Reference in new issue
Block a user