0.0.9 • Published 4 years ago
cucamelon v0.0.9
Table of Contents
const { expect } = require('chai')
const { Scenario } = require('cucamelon')
suite('Basic Math', () => {
setup(function () {
this.steps = {
'x is {number}' : function (x) { this.x = x },
'I add {number} to x': function (add) { this.x += add },
'y is {number}' : function (y) { this.y = y },
'I sum x and y' : function () { this.z = this.x + this.y },
'I get {number}' : function (z) { expect(this.z).to.eql(z) }
}
})
Scenario`: Basic math
Given x is ${1}
And I add ${10} to x
And I add ${20} to x
And y is ${2}
When I sum x and y
Then I get ${33}
`
})
npm i cucamelon --save-dev
or
yarn add cucamelon --dev
- Mocha integration
- BDD style
- TDD style
- Jasmine integration
- AST based parser covering most of Gherkin's syntax ( nanospec based )
- Typed arguments
- I18n
- Jest integration