MCPcopy
hub / github.com/coder/mux / restoreUseModelsModuleMocks

Function restoreUseModelsModuleMocks

src/browser/hooks/useModelsFromSettings.test.ts:120–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120async function restoreUseModelsModuleMocks() {
121 // Bun's mock.module() has no disposer, and mock.restore() does not undo module mocks.
122 // Restore the real modules so this file cannot poison later tests in the same process.
123 await mock.module(PROVIDERS_CONFIG_MODULE, () => actualProvidersConfigModule);
124 await mock.module(ROUTING_MODULE, () => actualRoutingModule);
125 await mock.module(API_MODULE, () => actualAPIModule);
126 await mock.module(POLICY_CONTEXT_MODULE, () => actualPolicyContextModule);
127}
128
129let cleanupDom: (() => void) | null = null;
130

Callers 2

cleanupUseModelsHookTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected