From 2c70f430fa502add3ee64f9e64ea1d1aa880eb81 Mon Sep 17 00:00:00 2001 From: Matt Kantor Date: Mon, 28 Apr 2025 21:43:20 -0400 Subject: [PATCH] Fix test failure backtraces --- src/parsing.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parsing.test.ts b/src/parsing.test.ts index 740528b..2520fe8 100644 --- a/src/parsing.test.ts +++ b/src/parsing.test.ts @@ -232,7 +232,7 @@ const assertSuccess = ( actualResult: ParserResult, expectedOutput: Output, ) => - customAssertions(assertRight, () => { + customAssertions(assertSuccess, () => { if (either.isLeft(actualResult)) { assert.fail('result was failure; expected success') } @@ -242,7 +242,7 @@ const assertSuccess = ( const assertFailure = ( actualResult: Either, ) => - customAssertions(assertRight, () => + customAssertions(assertFailure, () => assert( either.isLeft(actualResult), 'result was successful; expected failure',