marigold-dev / marigold-dev/deku
[Test] Add some test over `yojson` instances
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 82
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
What about basic testing?
For instance, even if we can suppose that yojson is working, having tests like:
when calling to_yojson on this object, it produces the following JSON
or also
when calling to_yojson then from_yojson, it gives back the original object
If we always say "we can do that later" we will never do it... Moreover, some tests are just quick-win and ensure our domain is safe in the real world.
For instance, I think the function http_request isn't so difficult to test, am I wrong?
Or maybe we can start by only testing http_post function, which is exposed and used, and test the others later.
What do you think?
Originally posted by @gsebil08 in https://github.com/marigold-dev/deku/pull/444#discussion_r813671456
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the yojson conversions and the exposed http_post function, then inspect how http_request is used. Done means tests cover expected to_yojson output and verify that to_yojson followed by from_yojson returns the original object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- api, testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100