chore: les dix injections de useShape passent par le faux partage
Dix sites, pas les deux que le suivi annoncait : `(() => {}) as unknown as
UseShapeLike` survivait la ou le type etait encore `any` et ou le cast ne
disait donc rien. Ils prennent le faux partage, sans cast.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
import { mock } from "bun:test";
|
||||
import { makeUseShapeHook } from "./use-shape-fake";
|
||||
import { configure, storeRegistry } from "../src/index";
|
||||
import {
|
||||
configureStoreRegistry,
|
||||
@@ -399,7 +400,7 @@ export function makeWallet(quads: Quad[], options: WalletOptions = {}): FakeWall
|
||||
/** Wire the library onto `quads` — what a page load does. */
|
||||
export function bootPage(quads: Quad[], options: WalletOptions = {}): FakeWallet {
|
||||
const ng = makeWallet(quads, options);
|
||||
configure({ ng: ng as unknown as NgLike, useShape: (() => {}) as unknown as UseShapeLike });
|
||||
configure({ ng: ng as unknown as NgLike, useShape: makeUseShapeHook().hook });
|
||||
configureStoreRegistry({ getSession: async () => SESSION, normalizeId: (id) => id.trim() });
|
||||
return ng;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user