Skip to content
This repository

Convert data table values to intended data types #45

theycallmeswift opened this Issue February 16, 2012 · 1 comment

2 participants

Swift Julien Biezemans

Right now the data table parser assumes everything is a string and users have to manually convert fields to Booleans, objects, arrays, etc. More than willing to help out on this if you can point me in the right direction.

I've traced it back to this line:

It looks like Gherkin is actually converting everything to strings, so I'm not sure if that's a bug or something intentional.

Julien Biezemans

What you want is (table) transforms. It is intentional for (table) step arguments to be strings only: we can't implicitly infer what types to cast them to.

With transforms, one can tell Cucumber to process arguments before passing them to the matching step definition. The same applies to table transforms.

Transforms are not yet implemented in Cucumber.js.

If you're up to it, you can definitely work on it. Ping me if you need some guidance.

Closing this issue as it's a dupe of #13.

Julien Biezemans jbpros closed this February 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.