Given a raw array set to
a | b |
1 | 3 |
this.Given(/^a raw array set to$/, function(data, callback) {
data.raw(); // => [[a, b], [1, 3], [5, 8]]
data.hashes(); // => [{a: 1, b: 3}, {a: 5, b: 8}]
// any more?
callback();
});
Taken from http://grokbase.com/t/gg/cukes/12av4y61em/cucumber-js-passing-arrays
I've added this in the hope that I can find this again rather than trawling all over the place. PR for the readme when I get chance :-).
This is now documented in the features. @jbpros do we also need to add this to readme or what do you think we should do?
Yeah, it'd be nice to have the API documented in the README.
At some point, all the documentation should move to https://cucumber.io/docs/reference/javascript.
It would nice if you guys did an example of comparing the datatable values to a html table in the UI
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Yeah, it'd be nice to have the API documented in the README.
At some point, all the documentation should move to https://cucumber.io/docs/reference/javascript.