Skip to content

Conversation

@linus
Copy link

@linus linus commented Dec 13, 2022

This is just a PoC to show the feasability of doctest:ing the JSDoc
@examples instead of / in addition to other tests.

Because of require/import discrepancies, the test scaffolding needs
some import shenanigans.

Apart from that, the rounding needs to be handled somewhat differently.
This could be solved in other ways, if given a feature request to testy:

  • One could imagine the option to inject different expect-logic in the
    test suite (make expect behave more fuzzy).
  • Or, the option of injecting a helper function to use in @examples.
  • ... or other options.

In anticipation of a more thorough effort, though, it seems pertinent
to update and modernize the project first, though.

Nice library! 🙌

This is just a PoC to show the feasability of doctest:ing the JSDoc
@examples instead of / in addition to other tests.

Because of require/import discrepancies, the test scaffolding needs
some import shenanigans.

Apart from that, the rounding needs to be handled somewhat differently.
This could be solved in other ways, if given a feature request to testy:
- One could imagine the option to inject different expect-logic in the
test suite (make expect behave more fuzzy).
- Or, the option of injecting a helper function to use in @examples.
- ... or other options.

In anticipation of a more thorough effort, though, it seems pertinent
to update and modernize the project first, though.

Nice library! 🙌
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant