fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartexpect',
|
||||
version: '1.0.14',
|
||||
version: '1.0.15',
|
||||
description: 'manage expectations in code'
|
||||
}
|
||||
|
@ -118,6 +118,17 @@ export class Assertion {
|
||||
});
|
||||
}
|
||||
|
||||
public toMatch(comparisonObject: RegExp) {
|
||||
return this.runCheck(() => {
|
||||
const result = comparisonObject.test(this.getObjectToTestReference());
|
||||
if (!result) {
|
||||
throw new Error(
|
||||
`${this.baseReference} with drill down ${this.propertyDrillDown} does not equal ${comparisonObject}`
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public toBeTrue() {
|
||||
return this.runCheck(() => {
|
||||
const result =
|
||||
|
Reference in New Issue
Block a user