elm-explorations / elm-explorations/test
Read file from tests
- Dominant language
- Elm
- Stars
- 244
- Forks
- 40
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
Hello!
It would be really awesome if we were able to read files from our elm tests! As an example, consider canned JSON responses from an API. It would be great to keep these as separate `.json` files instead of bringing them into my elm source files as multi-line strings.
See this related Stack Overflow post: https://stackoverflow.com/questions/48378601/load-external-data-into-elm-test-suite
The solution in the post proposed using Native Modules. Unfortunately, because native modules have been (mostly) deprecated as of 0.19, it seems that the only way to reasonably use this approach to read files would be through `elm-explorations/test`. I think this a really reasonable use case for testing and would like to propose it as a feature request. I'm happy to help propose what an API might look like and implement a prototype if there is support from the admins.
Thanks,
Advait
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.