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) => {
|
return new Promise((res, rej) => {
|
||||||
const result = check(property(strategy, (t) => test.call(ctx, t)));
|
const result = check(property(strategy, (t) => test.call(ctx, t)));
|
||||||
if (result.failed) {
|
if (result.failed) {
|
||||||
console.log(result);
|
|
||||||
if (result.counterexample !== null) {
|
if (result.counterexample !== null) {
|
||||||
const examples = result.counterexample.map(it => {
|
const examples = result.counterexample.map(it => {
|
||||||
if (typeof it === 'string' && it.length === 0) {
|
if (typeof it === 'string') {
|
||||||
return "''";
|
return `'${it}'`;
|
||||||
} else {
|
} else {
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue