Skip to content

Commit

Permalink
Limit assertion check to startsWith('AssertionError')
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz committed May 10, 2018
1 parent 7df7b23 commit be2b907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/unit/check/property/AsyncProperty.spec.ts
Expand Up @@ -30,7 +30,7 @@ describe('AsyncProperty', () => {
});
const out = await p.run(p.generate(stubRng.mutable.nocall()).value);
assert.ok(
out!.startsWith('AssertionError [ERR_ASSERTION]: false == true'),
out!.startsWith('AssertionError'),
`Property should fail and attach the exception as string, got: ${out}`
);
assert.ok(out!.indexOf('\n\nStack trace:') !== -1, 'Property should include the stack trace when available');
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/property/Property.spec.ts
Expand Up @@ -30,7 +30,7 @@ describe('Property', () => {
});
const out = p.run(p.generate(stubRng.mutable.nocall()).value);
assert.ok(
out!.startsWith('AssertionError [ERR_ASSERTION]: false == true'),
out!.startsWith('AssertionError'),
`Property should fail and attach the exception as string, got: ${out}`
);
assert.ok(out!.indexOf('\n\nStack trace:') !== -1, 'Property should include the stack trace when available');
Expand Down

0 comments on commit be2b907

Please sign in to comment.