Variable: toBeOk
consttoBeOk:MatcherFunction
Defined in: testing/matchers/result.ts:47
Assert that a Result is Ok, optionally checking the value.
Example
import { expect } from 'vitest'
import { ok, err } from 'receta/result'
expect(ok(5)).toBeOk() // Pass
expect(ok(5)).toBeOk(5) // Pass
expect(ok(5)).toBeOk(10) // Fail
expect(err('fail')).not.toBeOk() // Pass