Skip to content

Commit

Permalink
fixup: explicit tests instead of boolean logic
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Jan 5, 2024
1 parent e3cecc0 commit 1e5890a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/functions/coerce.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ test('coerce tests', (t) => {
const coerceExpression = `coerce(${input}, ${JSON.stringify(options)})`
const coercedVersion = coerce(input, options) || {}
const expectedVersion = parse(expected)
t.ok(
expectedVersion.compare(coercedVersion) === 0 &&
expectedVersion.compareBuild(coercedVersion) === 0,
`${coerceExpression} should be equal to ${expectedVersion}`
t.equal(expectedVersion.compare(coercedVersion), 0,
`${coerceExpression} should be equal to ${expectedVersion}`)
t.equal(expectedVersion.compareBuild(coercedVersion), 0,
`${coerceExpression} build should be equal to ${expectedVersion}`)
)
})

Expand Down

0 comments on commit 1e5890a

Please sign in to comment.