Skip to content

Commit 7d35cf4

Browse files
committed
test(plugin-sdk): cover the repair bridge in the runtime-doctor facade surface lock
1 parent 437b2b3 commit 7d35cf4

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
11
import { describe, expect, it } from "vitest";
2+
import { createPluginStateSyncKeyedStore } from "../plugin-state/plugin-state-store.js";
3+
import * as doctorRepairRuntime from "./doctor-repair-runtime.js";
24
import * as runtimeDoctorMigrations from "./runtime-doctor-migrations.js";
35
import * as legacyRuntimeDoctor from "./runtime-doctor.js";
46

57
describe("legacy runtime-doctor package facade", () => {
6-
it("is exactly the dependency-light migration surface", () => {
7-
expect(Object.keys(legacyRuntimeDoctor).toSorted()).toEqual(
8-
Object.keys(runtimeDoctorMigrations).toSorted(),
9-
);
8+
it("is exactly the migration surface plus the published-artifact repair bridge", () => {
9+
// Bridge names ship for published pre-split doctor artifacts (#124041
10+
// class); delete them here alongside the runtime-doctor.ts bridge.
11+
const expected = [
12+
...new Set([
13+
...Object.keys(runtimeDoctorMigrations),
14+
...Object.keys(doctorRepairRuntime),
15+
"createPluginStateSyncKeyedStore",
16+
]),
17+
].toSorted();
18+
expect(Object.keys(legacyRuntimeDoctor).toSorted()).toEqual(expected);
1019
for (const key of Object.keys(runtimeDoctorMigrations)) {
1120
expect(legacyRuntimeDoctor[key as keyof typeof legacyRuntimeDoctor]).toBe(
1221
runtimeDoctorMigrations[key as keyof typeof runtimeDoctorMigrations],
1322
);
1423
}
24+
for (const key of Object.keys(doctorRepairRuntime)) {
25+
expect(legacyRuntimeDoctor[key as keyof typeof legacyRuntimeDoctor]).toBe(
26+
doctorRepairRuntime[key as keyof typeof doctorRepairRuntime],
27+
);
28+
}
29+
expect(legacyRuntimeDoctor.createPluginStateSyncKeyedStore).toBe(
30+
createPluginStateSyncKeyedStore,
31+
);
1532
});
1633
});

0 commit comments

Comments
 (0)