MCPcopy Create free account
hub / github.com/code-pushup/cli / makeMockFormat

Function makeMockFormat

packages/utils/src/lib/wal-sharded.int.test.ts:15–33  ·  view source on GitHub ↗
(
    overrides: Partial<WalFormat<T>>,
  )

Source from the content-addressed store, hash-verified

13 'wal-sharded',
14 );
15 const makeMockFormat = <T extends WalRecord>(
16 overrides: Partial<WalFormat<T>>,
17 ): WalFormat<T> => {
18 const {
19 baseName = 'wal',
20 walExtension = '.log',
21 finalExtension = '.json',
22 codec = stringCodec<T>(),
23 finalizer = records => `${JSON.stringify(records)}\n`,
24 } = overrides;
25
26 return {
27 baseName,
28 walExtension,
29 finalExtension,
30 codec,
31 finalizer,
32 };
33 };
34 let shardedWal: ShardedWal;
35
36 beforeEach(() => {

Callers 1

Calls 1

stringCodecFunction · 0.85

Tested by

no test coverage detected