@karol.wojcik has joined the channel
Hey, what are the opinions on Gherkin syntax. Will features defined in Gherkin through feature file be supported in lazytest?
Looks cool. I’m still trying to wrap my head around cucumber. On paper it looks kinda nice to provide unified specification across team members, but my gut tells me it’s overkill and hard to maintain long term.
Personally, I think Gherkin syntax is horrible and there are already Clojure testing libraries out there that support it, if that's your jam, such as https://github.com/schmorgurken/schmorgurken https://github.com/jrwdunham/tegere https://github.com/danielmiladinov/burpless https://github.com/defsquare/scenari
gherkin is like cucumber, right?
i thought about implementing this back in september but didn't have any reason to yet, so never followed through
tegere, as referenced in sean's list, returns the gherkin feature files as data, and exposes some helper functions so you can bind as you wish (writing on my phone, my apologies for mistakes)
(require
'[tegere.steps :refer [registry Given When Then]]
'[lazytest.core :as lt]
'[lazytest.suite :as lt.s)
(Given "a {animal}" (fn [ctx animal] (assoc ctx :animal animal)))
(When "I give him a {fruit}"
(fn [ctx fruit]
(assoc ctx :current-suite (lt.s/suite {:doc fruit}))))
(Then "he is {emotion}"
(fn [{actual-emotion :emotion :as ctx} emotion]
(update-in ctx [:current-suite :children] conj (lt/it (str "he is " emotion) (lt/expect (= actual-emotion emotion))))))
and then you gotta figure out some way to run it from within lazytest, i'm not sure how that or any other lbirary works