|
1 | 1 | 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"; |
2 | 4 | import * as runtimeDoctorMigrations from "./runtime-doctor-migrations.js"; |
3 | 5 | import * as legacyRuntimeDoctor from "./runtime-doctor.js"; |
4 | 6 |
|
5 | 7 | 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); |
10 | 19 | for (const key of Object.keys(runtimeDoctorMigrations)) { |
11 | 20 | expect(legacyRuntimeDoctor[key as keyof typeof legacyRuntimeDoctor]).toBe( |
12 | 21 | runtimeDoctorMigrations[key as keyof typeof runtimeDoctorMigrations], |
13 | 22 | ); |
14 | 23 | } |
| 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 | + ); |
15 | 32 | }); |
16 | 33 | }); |
0 commit comments