better string formatting
This commit is contained in:
parent
6bec31e4d1
commit
3383718aac
|
@ -13,11 +13,10 @@ export function over<T>(name: string, strategy: Arbitrary<T>, suite: Suite<T>):
|
|||
return new Promise((res, rej) => {
|
||||
const result = check(property(strategy, (t) => test.call(ctx, t)));
|
||||
if (result.failed) {
|
||||
console.log(result);
|
||||
if (result.counterexample !== null) {
|
||||
const examples = result.counterexample.map(it => {
|
||||
if (typeof it === 'string' && it.length === 0) {
|
||||
return "''";
|
||||
if (typeof it === 'string') {
|
||||
return `'${it}'`;
|
||||
} else {
|
||||
return it;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue