Skip to content

Commit d88e458

Browse files
authored
Merge pull request #6 from mkantor/fix-test-assertion-helpers
Fix test failure backtraces
2 parents 28f9613 + 2c70f43 commit d88e458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parsing.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ const assertSuccess = <Output>(
232232
actualResult: ParserResult<Output>,
233233
expectedOutput: Output,
234234
) =>
235-
customAssertions(assertRight, () => {
235+
customAssertions(assertSuccess, () => {
236236
if (either.isLeft(actualResult)) {
237237
assert.fail('result was failure; expected success')
238238
}
@@ -242,7 +242,7 @@ const assertSuccess = <Output>(
242242
const assertFailure = <Output>(
243243
actualResult: Either<InvalidInputError, Output>,
244244
) =>
245-
customAssertions(assertRight, () =>
245+
customAssertions(assertFailure, () =>
246246
assert(
247247
either.isLeft(actualResult),
248248
'result was successful; expected failure',

0 commit comments

Comments
 (0)