UNPKG

console-fail-test

Version:

Gently fails test runs if the console was used during them. 📢

1 lines • 753 B
{"version":3,"sources":["../../src/complaining/formatComplaintCall.ts"],"sourcesContent":["import { SpyCallArgs } from \"../spies/spyTypes.js\";\n\nconst formatComplaintLineArg = (arg: unknown) => {\n\ttry {\n\t\treturn JSON.stringify(arg) || JSON.stringify(`${arg}`);\n\t} catch {\n\t\treturn `A recursive object with keys: ${Object.keys(arg as {}).join(\", \")}`;\n\t}\n};\n\nexport const formatComplaintCall = (call: SpyCallArgs) =>\n\tcall.map(formatComplaintLineArg).join(\", \");\n"],"mappings":"AAEA,MAAM,yBAAyB,CAAC,QAAiB;AAChD,MAAI;AACH,WAAO,KAAK,UAAU,GAAG,KAAK,KAAK,UAAU,GAAG,GAAG,EAAE;AAAA,EACtD,QAAQ;AACP,WAAO,iCAAiC,OAAO,KAAK,GAAS,EAAE,KAAK,IAAI,CAAC;AAAA,EAC1E;AACD;AAEO,MAAM,sBAAsB,CAAC,SACnC,KAAK,IAAI,sBAAsB,EAAE,KAAK,IAAI;","names":[]}