Skip to content

Use of const keyword #78

Closed
sledgebox opened this Issue Jul 19, 2012 · 8 comments

3 participants

@sledgebox

Use of the const keyword as in the following does not work in IE. The demo page does not work in IE because of this. Couldn't the browser version of this have use of const replaced with var?

const _lexer_actions = [ ...

@jbpros
Cucumber member
jbpros commented Jul 24, 2012

Thank you @sledgebox. It's a Gherkin issue. It's been reported.

@jbpros
Cucumber member
jbpros commented Sep 8, 2012

Fixed on Gherkin. We need a Gherkin release now :)

@jbpros jbpros referenced this issue in cucumber/gherkin2 Oct 6, 2012
Closed

(JS) Can't run on IE because of `const` keyword #186

@jbpros jbpros added a commit that closed this issue Oct 8, 2012
@jbpros jbpros Bump Gherkin (close #78) 356d16e
@jbpros jbpros closed this in 356d16e Oct 8, 2012
@jbpros jbpros added a commit that referenced this issue Oct 8, 2012
@jbpros jbpros Revert "Bump Gherkin" (reopen #78)
This reverts commit 356d16e.
2224626
@jbpros jbpros reopened this Oct 8, 2012
@jbpros
Cucumber member
jbpros commented Oct 8, 2012

Gherkin 2.11.3 breaks cucumber.js. Investigating.

@aslakhellesoy
Cucumber member

That's not good. node_modules/.bin/jasmine-node spec works with both 2.11.1 and 2.11.3 for me. How does it break?

@aslakhellesoy
Cucumber member

Ok, ./bin/cucumber.js breaks...

@aslakhellesoy
Cucumber member

To reproduce in gherkin proper: node js/example/print.js

@jbpros
Cucumber member
jbpros commented Oct 8, 2012

@aslakhellesoy Looks like https://github.com/cucumber/gherkin/blob/master/js/lib/gherkin.js#L5 is not correct anymore. Lexer modules do not export any Lexer property anymore (which is better IMO). This is quite an old change already.

Another problem is that the listener object passed to gherkin is explicitely checked for the presence of all event handlers, including scenario_outline and example. Cucumber.js is currently not exposing those two.

I'm fixing the latter and I worked around the former by directly requiring gherkin/lib/gherkin/lexer/en but a fix in Gherkin is needed. Do you want me to make an issue for it? Pull request sent.

@jbpros
Cucumber member
jbpros commented Oct 8, 2012

@aslakhellesoy BTW, when you want to run cucumber.js's tests, please invoke $ rake to run the feature suite (through cucumber-ruby and cucumber-js) in addition to the specs. The specs were not supposed to fail here as Gherkin's API is mocked, but the feature suite was expected to go red and it did.

@jbpros jbpros added a commit that closed this issue Oct 8, 2012
@jbpros jbpros Bump Gherkin (close #78) b94b07b
@jbpros jbpros closed this in b94b07b Oct 8, 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.