avh4 / elm-testable

Makes Cmds and Tasks testable
http://package.elm-lang.org/packages/avh4/elm-testable/latest
41 stars 5 forks source link

Resolve native references later to avoid import order problems? #12

Open avh4 opened 7 years ago

avh4 commented 7 years ago

Moved here from #11 via @rogeriochaves

It would be much better if we could not depend on loading order, with a solution like this: https://github.com/elm-community/webgl/pull/14/files

But idk if this will work for elm-testable, what do you think? Any ideas?

avh4 commented 7 years ago

I'm thinking this probably won't work because we need to overwrite those variables, not just read them; and also because we need to overwrite them before any actual code runs. Though maybe we could do this in TestContext.start?

It's probably worth experimenting with, though.

Also, note that I believe native-to-native references are changing in 0.19, so probably not worth investigating this we update for Elm 0.19.