From 48a1f3756b927098357107baf4009740f562520a Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Thu, 3 Jan 2019 06:11:13 +0100 Subject: reuse: Apply function with Ramda and Lodash --- reuse/features/steps/ramda.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 reuse/features/steps/ramda.js (limited to 'reuse/features/steps/ramda.js') diff --git a/reuse/features/steps/ramda.js b/reuse/features/steps/ramda.js new file mode 100644 index 0000000..b7914b8 --- /dev/null +++ b/reuse/features/steps/ramda.js @@ -0,0 +1,15 @@ +import { Before, Given, Then } from 'cucumber' +import { expect } from 'chai' +import R from 'ramda' + +function step (name) { + this.names.push(name) +} + +Given('a person with a last name', R.partial(step, ['Junior'])) +Given('a person with the last name {word}', R.partial(step, [])) + +Then('the last names are collected by the same function', function () { + expect(this.names).to.have.lengthOf(2) + expect(this.names).to.include.members(['Junior', 'Doe']) +}) -- cgit v1.2.3