Skip to content

Commit

Permalink
Merge pull request #446 from untidy-hair/chore/test-fix
Browse files Browse the repository at this point in the history
Fix a test to be in an intended way
  • Loading branch information
supermacro authored Mar 11, 2023
2 parents 1060e08 + a9a5ea6 commit 69f3556
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('Result.Ok', () => {
// network calls
// disk io
// etc ...
return Promise.resolve(ok('Very Nice!'))
return Promise.resolve('Very Nice!')
})

const okVal = ok(12)
Expand All @@ -155,6 +155,7 @@ describe('Result.Ok', () => {

expect(newResult.isOk()).toBe(true)
expect(asyncMapper).toHaveBeenCalledTimes(1)
expect(newResult._unsafeUnwrap()).toStrictEqual('Very Nice!')
})

it('Matches on an Ok', () => {
Expand Down Expand Up @@ -265,7 +266,7 @@ describe('Result.Err', () => {
// network calls
// disk io
// etc ...
return Promise.resolve(ok('Very Nice!'))
return Promise.resolve('Very Nice!')
})

const errVal = err('nooooooo')
Expand Down

0 comments on commit 69f3556

Please sign in to comment.