4

After being completely confused and googling tutorial after tutorial, reading books about cucumber that do not cover the JS implementation, I got over the fear of flames and decided to post my question here.

I have setup Cucumber-JS on my box, running fine. I use CoffeeScript, because I am lazy. I got my features folder, have my .feature written. Got my step definition and figured out that Cucumber JS requires a 'World' thingie to be anything near useful. I also discovered just moments ago, there can be some env.js tweaking to make this setup find the rest of my app.

I am not building a web based app, as I want some core logic to be worked out first. Where my trouble starts is the part how I am supposed to continue now.

I have a folder called 'lib' in the project root. Inside it, it is going to have my JS app, which I will eventually be running through NodeJS.

What changes do I have to make to env.js, world.coffee and mystep definition to be able to test my code I am developing in lib/myapp.coffee?

Thank you!

MiningSam
  • 583
  • 2
  • 7
  • 22

1 Answers1

1

Eventually, I found out this is no Cucumber thing. It has to do with NodeJS and the way it handles modules. I eventually ended here:

http://www.sitepoint.com/understanding-module-exports-exports-node-js/

MiningSam
  • 583
  • 2
  • 7
  • 22