mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-17 20:21:13 +00:00
test: fix huggingface discovery fixture
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user