console-fail-test
Version:
Gently fails test runs if the console was used during them. 📢
1 lines • 733 B
Source Map (JSON)
{"version":3,"sources":["../src/console.ts"],"sourcesContent":["import { ConsoleSettings } from \"./types.js\";\n\nconst isValidMemberName = (methodName: string) =>\n\t!methodName.startsWith(\"_\") && methodName[0].toLowerCase() === methodName[0];\n\nexport const consoleMethodNames: (keyof ConsoleSettings)[] = (\n\tObject.keys(console) as (keyof Console)[]\n)\n\t.filter(\n\t\t(methodName) =>\n\t\t\tisValidMemberName(methodName) &&\n\t\t\ttypeof console[methodName] === \"function\",\n\t)\n\t.sort();\n"],"mappings":"AAEA,MAAM,oBAAoB,CAAC,eAC1B,CAAC,WAAW,WAAW,GAAG,KAAK,WAAW,CAAC,EAAE,YAAY,MAAM,WAAW,CAAC;AAErE,MAAM,qBACZ,OAAO,KAAK,OAAO,EAElB;AAAA,EACA,CAAC,eACA,kBAAkB,UAAU,KAC5B,OAAO,QAAQ,UAAU,MAAM;AACjC,EACC,KAAK;","names":[]}