-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add improved assertion library from folio #201
Comments
I agree we should make this easier with a more out of the box solution, and this seems a good choice (given the wider Framework’s association with Playwright/runner). As the framework is still only in preview with potential breaking changes, would we want to hold off implementing this into Synthetics GA until it’s ready (users still have the freedom to use assertions like we document today, or add Folio or an alternative)? |
It's important we do something prior to GA that users can depend on. |
I agree with that the majority of use-case should be supported out of the box without an external lib. |
Not sure if you are aware, Folio assertion (expect) uses the Jest's expect which is what we should be going for and its released as a standalone package - https://www.npmjs.com/package/expect. Another cool thing is that we can also add our own matchers by extending the |
+1 on just using Jest directly |
At the moment we're unopinionated about assertions, but, this is something we should probably bake in. One thing to consider would be Microsoft's folio/expect.
We would alias it, so users could import it like
import { expect } from '@elastic/synthetics'
As-is, we rely on
assert
in examples, which is too minimal. While users can use any library, it's good to have one sanctioned one, especially for inline examples (where we should just provideexpect
.@vigneshshanmugam @jahtalab @paulb-elastic would love your thoughts here
The text was updated successfully, but these errors were encountered: