Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const batchKey = () => 'hi';
const batchHandler = operations => Observable.of();
const batch = new LocalScopedLink({
batchInterval: 20,
batchMax: 20,
batchKey,
batchHandler,
});
const {
batchInterval,
batchMax,
batchKey: batchKeyArg,
} = BatchLink.mock.calls[0][0];
expect(batchInterval).toBe(20);
expect(batchMax).toBe(20);
expect(batchKeyArg()).toEqual(batchKey());
});