[MLv2] Test `metabase.lib.convert` by round-tripping every `mbql-query` (#29487)
This is a great way to make sure the conversion in both directions is robust; every feature of MBQL is exercised somewhere in the BE tests. In a few cases the `mbql-query` is called from a context where a `(is ...)` test won't work - those places can use a `mbql-query-no-test` instead. There were actually only two of these. This exposed several issues in `->legacy-MBQL` which have now been fixed.
Showing
- .clj-kondo/config.edn 2 additions, 0 deletions.clj-kondo/config.edn
- src/metabase/lib/convert.cljc 72 additions, 43 deletionssrc/metabase/lib/convert.cljc
- src/metabase/lib/js.cljs 4 additions, 6 deletionssrc/metabase/lib/js.cljs
- test/metabase/api/dashboard_test.clj 4 additions, 3 deletionstest/metabase/api/dashboard_test.clj
- test/metabase/lib/convert_test.cljc 35 additions, 0 deletionstest/metabase/lib/convert_test.cljc
- test/metabase/query_processor_test/expressions_test.clj 1 addition, 1 deletiontest/metabase/query_processor_test/expressions_test.clj
- test/metabase/test.clj 1 addition, 0 deletionstest/metabase/test.clj
- test/metabase/test/data.clj 23 additions, 6 deletionstest/metabase/test/data.clj
Loading
Please register or sign in to comment