blob: 2bc0b5a669f38604e3ce82a0ed4bf20f100cc1b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { Before, Given, Then } from '@cucumber/cucumber'
import { expect } from 'chai'
import * as 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'])
})
|