cli-testing-library
Version:
Simple and complete CLI testing utilities that encourage good testing practices.
1 lines • 1.73 kB
Source Map (JSON)
{"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["import { cleanup } from \"./pure\";\n\n// if we're running in a test runner that supports afterEach\n// or teardown then we'll automatically run cleanup afterEach test\n// this ensures that tests run in isolation from each other\n// if you don't like this then set the CTL_SKIP_AUTO_CLEANUP env variable to 'true'.\nif (\n typeof process === \"undefined\" ||\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n !(process.env && process.env.CTL_SKIP_AUTO_CLEANUP)\n) {\n // ignore teardown() in code coverage because Jest does not support it\n /* istanbul ignore else */\n if (typeof afterEach === \"function\") {\n afterEach(async () => {\n await cleanup();\n });\n } else if (typeof teardown === \"function\") {\n // Block is guarded by `typeof` check.\n // eslint does not support `typeof` guards.\n\n teardown(async () => {\n await cleanup();\n });\n }\n}\n\nexport * from \"./config\";\nexport * from \"./helpers\";\nexport * from \"./events\";\nexport * from \"./get-queries-for-instance\";\nexport * from \"./matches\";\nexport * from \"./pure\";\nexport * from \"./query-helpers\";\nexport * from \"./queries/index\";\nexport * as queries from \"./queries/index\";\nexport * from \"./mutation-observer\";\nexport * from \"./wait-for\";\nexport * from \"./user-event/index\";\n"],"names":["cleanup"],"mappings":";;;;;;;;;;;;;;AAMA,IACE,OAAO,YAAY;AAEnB,EAAE,QAAQ,OAAO,QAAQ,IAAI,wBAC7B;AAGI,MAAA,OAAO,cAAc,YAAY;AACnC,cAAU,YAAY;AACpB,YAAMA,aAAQ;AAAA,IAAA,CACf;AAAA,EAAA,WACQ,OAAO,aAAa,YAAY;AAIzC,aAAS,YAAY;AACnB,YAAMA,aAAQ;AAAA,IAAA,CACf;AAAA,EAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}