test: fix huggingface discovery fixture

This commit is contained in:
Peter Steinberger
2026-04-07 11:15:56 +01:00
parent 0b04d27beb
commit 1395650d95

View File

@@ -20,7 +20,7 @@ vi.mock("./onboard.js", () => ({
import plugin from "./index.js";
function _registerProvider() {
function registerProvider() {
return registerProviderWithPluginConfig({});
}
@@ -45,10 +45,20 @@ function registerProviderWithPluginConfig(pluginConfig: Record<string, unknown>)
describe("huggingface plugin", () => {
it("skips catalog discovery when plugin discovery is disabled", async () => {
const provider = registerProviderWithPluginConfig({ discovery: { enabled: false } });
const provider = registerProvider();
const result = await provider.catalog.run({
config: {},
config: {
plugins: {
entries: {
huggingface: {
config: {
discovery: { enabled: false },
},
},
},
},
},
resolveProviderApiKey: () => ({
apiKey: "hf_test_token",
discoveryApiKey: "hf_test_token",