Move service state into InstanceState, flatten service facades (#18483)

This commit is contained in:
Kit Langton 2026-03-21 00:51:35 -04:00 • committed by GitHub
commit 38e0dc9ccd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,15 +31,26 @@ describe("plugin.auth-override", () => {
},
})
await Instance.provide({
await using plain = await tmpdir()
const methods = await Instance.provide({
directory: tmp.path,
fn: async () => {
const methods = await ProviderAuth.methods()
const copilot = methods[ProviderID.make("github-copilot")]
expect(copilot).toBeDefined()
expect(copilot.length).toBe(1)
expect(copilot[0].label).toBe("Test Override Auth")
return ProviderAuth.methods()
},
})
const plainMethods = await Instance.provide({
directory: plain.path,
fn: async () => {
return ProviderAuth.methods()
},
})
const copilot = methods[ProviderID.make("github-copilot")]
expect(copilot).toBeDefined()
expect(copilot.length).toBe(1)
expect(copilot[0].label).toBe("Test Override Auth")
expect(plainMethods[ProviderID.make("github-copilot")][0].label).not.toBe("Test Override Auth")
}, 30000) // Increased timeout for plugin installation
})