mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
test(api): type heterogeneous provider calls
This commit is contained in:
@@ -86,13 +86,14 @@ describe('the settings Remote namespace a configuration page calls', () => {
|
|||||||
it('reports the actionable configuration error while no settings provider is mounted', async () => {
|
it('reports the actionable configuration error while no settings provider is mounted', async () => {
|
||||||
const ctx = new Context()
|
const ctx = new Context()
|
||||||
await ctx.plugin(SettingsController)
|
await ctx.plugin(SettingsController)
|
||||||
for (const call of [
|
const calls: Array<() => unknown> = [
|
||||||
() => ctx.settingsController.describe(),
|
() => ctx.settingsController.describe(),
|
||||||
() => ctx.settingsController.update('ui-test', {}, undefined),
|
() => ctx.settingsController.update('ui-test', {}, undefined),
|
||||||
() => ctx.settingsController.replace('ui-test', {}, undefined),
|
() => ctx.settingsController.replace('ui-test', {}, undefined),
|
||||||
() => ctx.settingsController.mutate('ui-test', [], undefined),
|
() => ctx.settingsController.mutate('ui-test', [], undefined),
|
||||||
]) {
|
]
|
||||||
const failure = await Promise.resolve().then(() => call()).catch((error: unknown) => error)
|
for (const call of calls) {
|
||||||
|
const failure = await Promise.resolve().then(call).catch((error: unknown) => error)
|
||||||
expect(failure).toBeInstanceOf(TypertRemoteFailure)
|
expect(failure).toBeInstanceOf(TypertRemoteFailure)
|
||||||
expect((failure as TypertRemoteFailure).failure).toEqual({
|
expect((failure as TypertRemoteFailure).failure).toEqual({
|
||||||
code: 'internal',
|
code: 'internal',
|
||||||
|
|||||||
Reference in New Issue
Block a user