diff --git a/package.json b/package.json index 2cb666b..b77c52d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mocha-foam", - "version": "0.1.1", + "version": "0.1.2", "main": "out/src/index.js", "author": "ssube ", "license": "MIT", diff --git a/src/index.ts b/src/index.ts index 7197113..a7e5100 100644 --- a/src/index.ts +++ b/src/index.ts @@ -82,13 +82,7 @@ export function briefReporter(details: RunDetails<[T]>): string { */ export function formatExamples(details: RunDetails<[T]>): string { if (details.counterexample !== null) { - const examples = details.counterexample.map((val) => { - if (isString(val)) { - return `'${val}'`; - } else { - return val; - } - }).join(','); + const examples = details.counterexample.map((val) => JSON.stringify(val)).join(','); return `failing on: ${examples} (seed: ${details.seed}, path: '${details.counterexamplePath}')`; } else { return `without counterexamples (seed: ${details.seed})`;