mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 17:04:46 +00:00
test: dedupe channel setup mock reads
This commit is contained in:
@@ -79,7 +79,7 @@ function makePluginRegistry(overrides: Partial<PluginRegistry> = {}): PluginRegi
|
||||
}
|
||||
|
||||
function callArg<T>(mock: { mock: { calls: unknown[][] } }, index = 0, _type?: (value: T) => T): T {
|
||||
const call = mock.mock.calls.at(index);
|
||||
const call = mock.mock.calls[index];
|
||||
if (!call) {
|
||||
throw new Error(`Expected mock call ${index}`);
|
||||
}
|
||||
@@ -87,7 +87,7 @@ function callArg<T>(mock: { mock: { calls: unknown[][] } }, index = 0, _type?: (
|
||||
}
|
||||
|
||||
function mockCall(mock: { mock: { calls: unknown[][] } }, index = 0): unknown[] {
|
||||
const call = mock.mock.calls.at(index);
|
||||
const call = mock.mock.calls[index];
|
||||
if (!call) {
|
||||
throw new Error(`Expected mock call ${index}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user