Replies: 1 comment
-
You could use the import {equivalence} from 'fluture/test/assertions.js';
import {encaseP, map, resolve} from 'fluture';
const findByRole = param1 => encaseP (param2 => screen.findByRole (param1, param2));
findByRole ('button') ({name: 'Click me!'})
.pipe (map (component => expect(component).toBeInTheDocument ()))
.pipe (equivalence (resolve (/* Whatever toBeInTheDocument returns */))); But I would probably implement an |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm just getting into using Fluture and I was wondering if there is a recommended way to use Fluture with Jest? The issue is that Jest's "expect" function needs to be able to throw an error but Fluture consumes them.
Here's my code. Even if
expect
fails here Jest reports that the test passes.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions