Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
evolvingriley committed Apr 23, 2022
0 parents commit c15d129
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/pnpm-lock.yaml
5 changes: 5 additions & 0 deletions features/hear_shout.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Feature: Hear Shout
Scenario: Listener is within range
Given Lucy is located 15 meters from Sean
When Sean shouts "free bagels at Sean's"
Then Lucy hears sean's message
27 changes: 27 additions & 0 deletions features/step_definitions/steps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const { Given, When, Then } = require('@cucumber/cucumber')

// Given Lucy is located 15 meters from Sean
// Undefined. Implement with the following snippet:

Given('Lucy is located {int} meters from Sean', function (distance) {
// Given('Lucy is located {float} meters from Sean', function (float) {
// Write code here that turns the phrase above into concrete actions
console.log(distance)
return 'pending';
});

// When Sean shouts "free bagels at Sean's"
// Undefined. Implement with the following snippet:

When('Sean shouts {string}', function (string) {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});

// Then Lucy hears sean's message
// Undefined. Implement with the following snippet:

Then('Lucy hears sean\'s message', function () {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "bdd-cucumber",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "cucumber-js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@cucumber/cucumber": "^8.1.2",
"hamjest": "^3.7.3"
}
}

0 comments on commit c15d129

Please sign in to comment.