You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update support code library interface - instead of exporting a function and calling methods on this, require the cucumber module and call defineSupportCode which passes an object as the first argument whch exposes the methods. Overriding the world constructor has changed from overriding the World property to calling setWorldConstructor.
$ ./node_modules/cucumber/bin/cucumber.js
Feature: test cucumber
As a test engineer
I want cucumber to provide valid code snippets
So that I can write valid step definitions
Scenario: A simple test
? Given I have a test with no step definition
? When I execute the test
? Then I receive a valid code snippet
Warnings:
Scenario: A simple test - features/test.feature:8
Step: Given I have a test with no step definition - features/test.feature:9
Message:
Undefined. Implement with the following snippet:
this.Given('I have a test with no step definition', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
Scenario: A simple test - features/test.feature:8
Step: When I execute the test - features/test.feature:10
Message:
Undefined. Implement with the following snippet:
this.When('I execute the test', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
Scenario: A simple test - features/test.feature:8
Step: Then I receive a valid code snippet - features/test.feature:11
Message:
Undefined. Implement with the following snippet:
this.Then('I receive a valid code snippet', function (callback) {
// Write code here that turns the phrase above into concrete actions
callback(null, 'pending');
});
The code snippets, and subsequently all step definition files, are no longer valid.
The CHANGELOG.md indicates this change happened with 2.0.0-rc.4:
Uploading .feature files is not supported on github, so I have appended .txt to the feature file.
test.feature.txt
Sample output:
$ ./node_modules/cucumber/bin/cucumber.js -v
2.0.0-rc.5
$ ./node_modules/cucumber/bin/cucumber.js
Feature: test cucumber
Scenario: A simple test
? Given I have a test with no step definition
? When I execute the test
? Then I receive a valid code snippet
Warnings:
Scenario: A simple test - features/test.feature:8
Step: Given I have a test with no step definition - features/test.feature:9
Message:
Undefined. Implement with the following snippet:
Scenario: A simple test - features/test.feature:8
Step: When I execute the test - features/test.feature:10
Message:
Undefined. Implement with the following snippet:
Scenario: A simple test - features/test.feature:8
Step: Then I receive a valid code snippet - features/test.feature:11
Message:
Undefined. Implement with the following snippet:
1 scenario (1 undefined)
3 steps (3 undefined)
0m00.000s
The text was updated successfully, but these errors were encountered: