mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:10:43 +00:00
test: tighten huggingface provider assertion
This commit is contained in:
@@ -40,7 +40,12 @@ function registerProviderWithPluginConfig(pluginConfig: Record<string, unknown>)
|
||||
);
|
||||
|
||||
expect(registerProviderMock).toHaveBeenCalledTimes(1);
|
||||
return registerProviderMock.mock.calls[0]?.[0];
|
||||
const firstCall = registerProviderMock.mock.calls.at(0);
|
||||
expect(firstCall).toBeDefined();
|
||||
if (!firstCall) {
|
||||
throw new Error("expected huggingface provider registration");
|
||||
}
|
||||
return firstCall[0];
|
||||
}
|
||||
|
||||
describe("huggingface plugin", () => {
|
||||
|
||||
Reference in New Issue
Block a user