cli-testing-library
Version:
Simple and complete CLI testing utilities that encourage good testing practices.
1 lines • 892 B
Source Map (JSON)
{"version":3,"file":"event-map.cjs","sources":["../../src/event-map.ts"],"sourcesContent":["import { killProc } from \"./process-helpers\";\nimport type { TestInstance } from \"./types\";\n\nconst isWin = process.platform === \"win32\";\n\nconst eventMap = {\n sigterm: (instance: TestInstance): Promise<void> =>\n killProc(instance, isWin ? undefined : \"SIGTERM\"),\n sigkill: (instance: TestInstance): Promise<void> =>\n killProc(instance, isWin ? undefined : \"SIGKILL\"),\n write: (instance: TestInstance, props: { value: string }): boolean =>\n instance.process.stdin.write(props.value),\n};\n\nexport { eventMap };\n"],"names":["killProc"],"mappings":";;;AAGA,MAAM,QAAQ,QAAQ,aAAa;AAEnC,MAAM,WAAW;AAAA,EACf,SAAS,CAAC,aACRA,wBAAS,UAAU,QAAQ,SAAY,SAAS;AAAA,EAClD,SAAS,CAAC,aACRA,wBAAS,UAAU,QAAQ,SAAY,SAAS;AAAA,EAClD,OAAO,CAAC,UAAwB,UAC9B,SAAS,QAAQ,MAAM,MAAM,MAAM,KAAK;AAC5C;;"}