ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

Fix deep elements (<Foo.bar />) tests #21

Closed jchavarri closed 5 years ago

jchavarri commented 5 years ago

This PR fixes an issue that was preventing the tests for elements that used deep accessors in the element function caller, like <Foo.bar /> or <Foo.Bar />.

The issue was related to the tests running on OCaml syntax (due to ocaml-migrate-parsetree driver not supporting Reason syntax) and this made that the generated OCaml code for <Foo.bar /> which transforms into Foo.Bar.createElement, being parsed as a Pexp_field expression.

Added also a lot of test cases for elements.