Improved specs for async matcher error messages
This commit is contained in:
@@ -39,7 +39,7 @@ describe('toBePending', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expect(f).toThrowError(
|
expect(f).toThrowError(
|
||||||
`Expected toBePending to be called on a promise but was on a ${typeof actual}.`
|
'Expected toBePending to be called on a promise but was on a string.'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ describe('toBeRejected', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expect(f).toThrowError(
|
expect(f).toThrowError(
|
||||||
`Expected toBeRejected to be called on a promise but was on a ${typeof actual}.`
|
'Expected toBeRejected to be called on a promise but was on a string.'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ describe('#toBeRejectedWithError', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expect(f).toThrowError(
|
expect(f).toThrowError(
|
||||||
`Expected toBeRejectedWithError to be called on a promise but was on a ${typeof actual}.`
|
'Expected toBeRejectedWithError to be called on a promise but was on a string.'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ describe('#toBeRejectedWith', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expect(f).toThrowError(
|
expect(f).toThrowError(
|
||||||
`Expected toBeRejectedWith to be called on a promise but was on a ${typeof actual}.`
|
'Expected toBeRejectedWith to be called on a promise but was on a string.'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ describe('toBeResolved', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expect(f).toThrowError(
|
expect(f).toThrowError(
|
||||||
`Expected toBeResolved to be called on a promise but was on a ${typeof actual}.`
|
'Expected toBeResolved to be called on a promise but was on a string.'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ describe('#toBeResolvedTo', function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expect(f).toThrowError(
|
expect(f).toThrowError(
|
||||||
`Expected toBeResolvedTo to be called on a promise but was on a ${typeof actual}.`
|
'Expected toBeResolvedTo to be called on a promise but was on a string.'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user