mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 01:04:45 +00:00
test: reuse watch-node mock call guard
This commit is contained in:
@@ -124,11 +124,7 @@ describe("watch-node script", () => {
|
||||
});
|
||||
|
||||
expect(createWatcher).toHaveBeenCalledTimes(1);
|
||||
const firstWatcherCall = createWatcher.mock.calls[0];
|
||||
if (firstWatcherCall === undefined) {
|
||||
throw new Error("expected watcher setup call");
|
||||
}
|
||||
const [watchPaths, watchOptions] = firstWatcherCall as unknown as [
|
||||
const [watchPaths, watchOptions] = requireMockCall(createWatcher, 0) as unknown as [
|
||||
string[],
|
||||
{ ignoreInitial: boolean; ignored: (watchPath: string) => boolean },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user