-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
How to unit test expressions #9354
Comments
@nreese We have separate tests for expressions which aren't unit tests. The expression test runner is https://github.com/mapbox/mapbox-gl-js/blob/master/test/expression.test.js Is this something you're planning on submitting as a PR for inclusion in the library? |
No. Testing the output of expressions in isolation seems like a common use case across mapbox users. I am just curious if there was an easy way to test expressions. |
Ah ok, it sounds like you're thinking more of a way to evaluate an expression outside of GL JS like #7670 |
Yes. |
Cool, I'm going to close this as a duplicate so we can focus discussion in one ticket. Thanks! |
Is there any way to unit test expressions? For example, I am working on an expression to pull a value from features and would like to set up a unit test that takes the expression and provides the output when passed features. Is this possible.
The text was updated successfully, but these errors were encountered: