This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


going back to my gherkin scenario -- if I transpile my cljs, it has deps on goog, and cucumber won't know how to read the files -- is there a way to have lumo simply transpile the cljs to es6 that could run in node?


@johnjelinek do you have a sharable project? Maybe I can have a look at it tomorrow, I am kind of worried that it is so hard to achieve that :smile:


I can come up with a gist, but you can give it a shot by translating these little javascript files into cljs:


if I build my step_definitions from cljs to js, it ends up looking like this:


and when I run cucumber via the CLI or via node like this:

import Cli from 'cucumber/lib/cli';

const cli = new Cli.default({
  argv: process.argv,
  cwd: '',
  stdout: process.stdout
it complains that it doesn't know what goog is


because the entrypoint is determined by cucumber, so there's not going to be a main.js kind of entrypoint


Uhm got it, sorry for keeping asking I will try to find some time to actually try this out


FYI when you get around to trying this out, I'm currently trying to run cucumber like this:

./node_modules/.bin/cucumber-js ../features -r out/main.js
where ../features includes my features files and my cljs step definitions


I'm not sure if this is right, but here's what an example step definitions looks like:

(ns step-definitions.steps)

(require 'chromedriver)
(def seleniumWebdriver (js/require "selenium-webdriver"))
(def defineSupportCode (.-defineSupportCode (js/require "cucumber")))

(defn custom-world []
  (this-as this
    (let [builder (new (.-Builder seleniumWebdriver))
          forBrowser (.forBrowser builder "chrome")]
      (set! (.-driver this) (.build forBrowser)))))

  (fn [context]
    (let [set-world-constructor (.-setWorldConstructor context)
          Given (.-Given context)
          When (.-When context)
          Then (.-Then context)
          After (.-After context)]
      (set-world-constructor custom-world)
      (After (this-as this (.quit (.-driver this))))
      (Given "I am on the Cucumber.js GitHub repository" #(println "test"))
      (When "I click on {string}" #(% (println %)))
      (Then "I should see {string}" #(% (println %))))))


that generates some js that looks like this:

// Compiled by ClojureScript 1.9.946 {:target :nodejs}
step_definitions.steps.node$module$chromedriver = require('chromedriver');
step_definitions.steps.seleniumWebdriver = require("selenium-webdriver");
step_definitions.steps.defineSupportCode = require("cucumber").defineSupportCode;
step_definitions.steps.custom_world = (function step_definitions$steps$custom_world(){
var this$ = this;
var builder = (new step_definitions.steps.seleniumWebdriver.Builder());
var forBrowser = builder.forBrowser("chrome");
return this$.driver =;
});,(function (context){
var set_world_constructor = context.setWorldConstructor;
var Given = context.Given;
var When = context.When;
var Then = context.Then;
var After = context.After;,step_definitions.steps.custom_world);,(function (){var this$ = this;
return this$.driver.quit();
})());,"I am on the Cucumber.js GitHub repository",((function (set_world_constructor,Given,When,Then,After){
return (function (){
);,"I click on {string}",((function (set_world_constructor,Given,When,Then,After){
return (function (p1__1_SHARP_){

return,"I should see {string}",((function (set_world_constructor,Given,When,Then,After){
return (function (p1__2_SHARP_){