(
config: Partial<Config>,
input: string
)
| 64 | }; |
| 65 | |
| 66 | async 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 | |
| 94 | for (const [configName, config] of Object.entries(CONFIG_OVERRIDES)) { |
| 95 | describe(configName, () => { |
no test coverage detected