MCPcopy Create free account
hub / github.com/banga/git-split-diffs / transform

Function transform

src/index.test.ts:66–92  ·  view source on GitHub ↗
(
    config: Partial<Config>,
    input: string
)

Source from the content-addressed store, hash-verified

64};
65
66async function transform(
67 config: Partial<Config>,
68 input: string
69): Promise<string> {
70 const testConfig: Config = {
71 ...TEST_CONFIG,
72 ...config,
73 };
74 const context = await getContextForConfig(
75 testConfig,
76 TEST_CHALK,
77 SCREEN_WIDTH
78 );
79
80 let string = '';
81 await transformContentsStreaming(
82 context,
83 Readable.from(input),
84 new (class extends Writable {
85 write(chunk: Buffer) {
86 string += chunk.toString();
87 return true;
88 }
89 })()
90 );
91 return string;
92}
93
94for (const [configName, config] of Object.entries(CONFIG_OVERRIDES)) {
95 describe(configName, () => {

Callers 1

index.test.tsFile · 0.85

Calls 2

getContextForConfigFunction · 0.90

Tested by

no test coverage detected