Closed avh4 closed 7 years ago
Ah, apparently ElmHtml.InternalTypes.decodeElmHtml
is not implemented for thunk
yet
Since elm-html-test currently strips out all functions with JSON.stringify, I think the simplest way to get this to work would be to call virtual-dom's render on the Html before stringifying, which would force all the thunks (the result of the thunks is stored in the vdom as node
after it's been forced, so then that would appear in the resulting JSON.
... unfortunately, it looks like Native.VirtualDom.render
is not accessible from outside, even in other native code :(
Okay, I've got a possible implementation for this--requires a change to both elm-html-test and elm-html-in-elm; I'll make the PRs shortly.
See https://github.com/eeue56/elm-html-test/issues/5 and https://github.com/eeue56/elm-html-in-elm/pull/2
Should be fixed by https://github.com/eeue56/elm-html-test/pull/7
Here's the toJsonString of the HTML being tested: https://gist.github.com/avh4/f4c68ca856386bc63683414279f69258