Skip to content

Allow non-comment expectation strings? #13

@matthewdowney

Description

@matthewdowney

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions