@@ -37,11 +37,11 @@ const {
3737const { resolveManifestContractPluginIdsByCompatibilityRuntimePathMock } = vi . hoisted ( ( ) => ( {
3838 resolveManifestContractPluginIdsByCompatibilityRuntimePathMock : vi . fn ( ( ) => [ "brave" ] ) ,
3939} ) ) ;
40- const { resolveManifestContractOwnerPluginIdMock, manifestRegistryActual } = vi . hoisted ( ( ) => ( {
40+ const { resolveManifestContractOwnerPluginIdMock, runtimeManifestActual } = vi . hoisted ( ( ) => ( {
4141 resolveManifestContractOwnerPluginIdMock : vi . fn ( ) ,
42- manifestRegistryActual : {
42+ runtimeManifestActual : {
4343 resolveManifestContractOwnerPluginId : undefined as
44- | typeof import ( "../plugins/manifest-registry .js" ) . resolveManifestContractOwnerPluginId
44+ | typeof import ( "./runtime-web-tools-manifest.runtime .js" ) . resolveManifestContractOwnerPluginId
4545 | undefined ,
4646 } ,
4747} ) ) ;
@@ -81,16 +81,25 @@ vi.mock("../plugins/manifest-registry.js", async () => {
8181 const actual = await vi . importActual < typeof import ( "../plugins/manifest-registry.js" ) > (
8282 "../plugins/manifest-registry.js" ,
8383 ) ;
84- manifestRegistryActual . resolveManifestContractOwnerPluginId =
84+ return {
85+ ...actual ,
86+ resolveManifestContractPluginIdsByCompatibilityRuntimePath :
87+ resolveManifestContractPluginIdsByCompatibilityRuntimePathMock ,
88+ } ;
89+ } ) ;
90+
91+ vi . mock ( "./runtime-web-tools-manifest.runtime.js" , async ( ) => {
92+ const actual = await vi . importActual < typeof import ( "./runtime-web-tools-manifest.runtime.js" ) > (
93+ "./runtime-web-tools-manifest.runtime.js" ,
94+ ) ;
95+ runtimeManifestActual . resolveManifestContractOwnerPluginId =
8596 actual . resolveManifestContractOwnerPluginId ;
8697 resolveManifestContractOwnerPluginIdMock . mockImplementation (
8798 actual . resolveManifestContractOwnerPluginId ,
8899 ) ;
89100 return {
90101 ...actual ,
91102 resolveManifestContractOwnerPluginId : resolveManifestContractOwnerPluginIdMock ,
92- resolveManifestContractPluginIdsByCompatibilityRuntimePath :
93- resolveManifestContractPluginIdsByCompatibilityRuntimePathMock ,
94103 } ;
95104} ) ;
96105
@@ -313,7 +322,7 @@ describe("runtime web tools resolution", () => {
313322 resolveBundledWebFetchProvidersFromPublicArtifactsMock . mockClear ( ) ;
314323 resolveManifestContractOwnerPluginIdMock . mockReset ( ) ;
315324 resolveManifestContractOwnerPluginIdMock . mockImplementation (
316- manifestRegistryActual . resolveManifestContractOwnerPluginId ! ,
325+ runtimeManifestActual . resolveManifestContractOwnerPluginId ! ,
317326 ) ;
318327 resolveManifestContractOwnerPluginIdMock . mockClear ( ) ;
319328 resolveManifestContractPluginIdsByCompatibilityRuntimePathMock . mockClear ( ) ;
0 commit comments