summaryrefslogtreecommitdiff
path: root/reuse/features/steps/lodash.js
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2019-01-03 06:11:13 +0100
committerEugen Wissner <belka@caraus.de>2019-01-03 06:11:13 +0100
commit48a1f3756b927098357107baf4009740f562520a (patch)
tree36d0607434a2d2c4fb56504bfc978feb3ec3306d /reuse/features/steps/lodash.js
parent54fcfda40a14b5c3150faff6b2929a31eeea057a (diff)
downloadcucumber-js-demo-48a1f3756b927098357107baf4009740f562520a.tar.gz
reuse: Apply function with Ramda and Lodash
Diffstat (limited to 'reuse/features/steps/lodash.js')
-rw-r--r--reuse/features/steps/lodash.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/reuse/features/steps/lodash.js b/reuse/features/steps/lodash.js
new file mode 100644
index 0000000..63092e1
--- /dev/null
+++ b/reuse/features/steps/lodash.js
@@ -0,0 +1,15 @@
+import { Before, Given, Then } from 'cucumber'
+import { expect } from 'chai'
+import _ from 'lodash'
+
+function step (name) {
+ this.names.push(name)
+}
+
+Given('a person with a first name', _.partial(step, 'John'))
+Given('a person with the first name {word}', step)
+
+Then('the first names are collected by the same function', function () {
+ expect(this.names).to.have.lengthOf(2)
+ expect(this.names).to.include.members(['John', 'Jack'])
+})