Skip to content

Commit b160cbb

Browse files
F915claude
andcommitted
test(bailian): add suiteTeardown to restore default provider config
Prevents Bailian E2E settings from leaking into subsequent test suites. Follows the same pattern as bedrock.test.ts suiteTeardown. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 73241c7 commit b160cbb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

apps/vscode-e2e/src/suite/providers/bailian.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,21 @@ describe("Bailian Provider", function () {
120120
/** @type {import("../../../src/extension/api").API} */
121121
let api: any
122122

123+
/** @type {import("../../../src/extension/api").ProviderSettings} */
124+
let originalConfig: any
125+
123126
before(async function () {
124127
api = globalThis.api
125128
if (!api) {
126129
throw new Error("E2E API not found — ensure the test runner initializes globalThis.api")
127130
}
131+
originalConfig = await api.getConfiguration()
132+
})
133+
134+
suiteTeardown(async function () {
135+
if (originalConfig) {
136+
await api.setConfiguration(originalConfig)
137+
}
128138
})
129139

130140
// -----------------------------------------------------------------------

0 commit comments

Comments
 (0)