mocha-gherkin
mocha-gherkin copied to clipboard
this.listener[event] is not a function
Hi, After installing the same using npm, while trying to execute "cat sample.feature | ./node_modules/.bin/mocha-gherkin > test.js" getting error like
/cucumberMocha/testProj/node_modules/gherkin/lib/gherkin/lexer/en.j s:960 this.listener[event](this.keyword, name, description, this.current_line); ^ TypeError: this.listener[event] is not a function at Lexer.store_keyword_content (/cucumberMocha/testProj/node_mo dules/gherkin/lib/gherkin/lexer/en.js:960:23)
Thanks in advance....
I was using 'Scenario Outline' instead of 'Scenario' in my feature file and i have some example part also. So that only i have received that error. When I remove example and changed as 'Scenario', then its works good.
Also I'm using 'Background' part in my feature. How I can able to mitigate this changes ? eg: **Feature: BasicBooking Background: Login as guest Given I log into the application as guest And I wait for 10s
Scenario Outline: Booking a sample ticket Then I click on 'submit' button And I press 'ok' button
Scenario Outline: Booking a complex ticket Then I click on 'adult' button And I press 'add' button Then I click on 'submit' button And I press 'ok' button**
- Scenario Outline should consider.
- Example part should take (optional).
- Background should include.