reuse: Apply function with Ramda and Lodash
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import { Before, Given, Then } from 'cucumber'
|
||||
import { expect } from 'chai'
|
||||
|
||||
Before(function () {
|
||||
this.names = []
|
||||
})
|
||||
|
||||
function step (name) {
|
||||
this.names.push(name)
|
||||
}
|
||||
@@ -13,7 +9,7 @@ function decorator (f, ...args) {
|
||||
if (args.length > 0) {
|
||||
return function () {
|
||||
f.call(this, args[0])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return f
|
||||
}
|
||||
|
Reference in New Issue
Block a user