-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cucumber support? #9
Comments
Hi! I haven't used cucumber myself, so I'm not familiar with it, but it would be a neat idea to support that in Clojure land :) I wonder if a cljs cypress cucumber could a project of it's own, maybe using cypress-clojurescript-preprocessor to do the cljs -> js transform only. |
It all looks like magic to me 😆 Do you think the least complex path would be, fork cypress-cucumber-preprocessor, and include your preprocessor into that? |
Re: magic :D What I was thinking was that since cypress allows to register multiple preprocessor, could the cljs-cucumber preprocessor exist separately, so that it only looks for feature files and then calls the cljs preprocessor to do cljs->js transform to produce js that can then be run inside the cypress runner? There might be some pointers in this issue: cypress-io/cypress#5832. Also, there's this open PR (#1) which removes the bundled browserify which I just haven't yet wrapped my head around, probably because it needs a (breaking) release with instructions on how to put the conditional into the preprocessor registration (not big thing but just haven't been able to focus on doing it :)). Sorry for the long mumble, but you could try something like the snipplet below. Just detect feature files in cypress plugin registration, delegate cljs feature implementation file transform to cljs preprocessor, skip the cljs implementation file (to not show it in cypress twice), but run cljs transform for non-feature files (plain cljs tests):
Now that I think about it, maybe you can just use the cljs preprocessor straight, just find a way to load the feature file in the feature implementation, but I guess you'd then need to implement the actual cucumber feature parsing also :) |
I keep thinking about this. In a way, I do want to implement the cucumber feature parsing because then I could extend the language. But I would want to re-use whatever is already doing the code-finding for features. |
Hello! I am implementing integration tests in Cypress at work, and we decided to use the Cucumber preprocessor. I'd love to try writing steps in ClojureScript to see what that's like; maybe something like
hello-cljs.feature
hello-cljs/steps.cljs
Do you think this is achievable? I don't know a lot about JavaScript -- any time I see
module.exports
I start sweating -- but I would try to help if this sounds like a feature worth adding.The text was updated successfully, but these errors were encountered: