How to use globals in Cucumber?

I’m trying to define a file products.js that will just contain nothing but my test data:

testData = {}
testData.products = [
  // ...
];

The problem is, my methods in fixtures.js can’t see this variable for some reason. How do I make it global across all JS files in Cucumber?

You need to assign it to the global variable: global.testData = {}. The Cucumber tests run in a node.js environment and not in a Meteor environment :wink:

Ah, excellent! Thank you :slight_smile: