Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow non-comment expectation strings? #13

Closed
matthewdowney opened this issue Dec 18, 2022 · 0 comments
Closed

Allow non-comment expectation strings? #13

matthewdowney opened this issue Dec 18, 2022 · 0 comments

Comments

@matthewdowney
Copy link
Owner

Sometimes if I'm using a comment form to show how something works, and the thing returns Clojure data, I'd rather not add ; comments at the beginning of each line:

(comment
  ;;; For example, use the schema to generate a trade
  (require 'malli.generator)

  (malli.generator/generate (get-schema :trade) {:seed 1})
  ;=>
  {:type :trade,
   :price -1.90625M,
   :qty 0.264251708984375M,
   :maker-side :asks,
   :tid "ivCwuDGY",
   :book "NChp1E8p5ys1lT21c5s8gLM09n3"}
  )

Perhaps cases where ;=> is immediately followed by a newline and a form, that form could be read as the expectation.

The downside would be weird behavior in cases where forms are all squished together and the ;=> is accidentally blank.

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

No branches or pull requests

1 participant