rtucek/vue-query-builder

Can you provide the better way to test a rule ?

Closed this issue · 1 comments

If it's easy for you, can you provide the better way to test a rule ?
i'm struggling a bit with it (in order to pass configuration and model) and maybe you've already done this before.

Thanks!

Not sure what you want to test and how.

Rules are simply "just" components, that you pass on to the query builder and need to adhere to the v-model API. They should be unit tested on their own and independently of their context. All you need to assert is that they adhere to the v-model API as outlined in the docs.

Could you further elaborate on what you're exactly trying to achieve?