@toa.io/tomato
TypeScript icon, indicating that this package has built-in type declarations

0.24.0-alpha.0 • Public • Published

Toa Tomato

Create BDD with TDD. Primitive mocking library for cucumber.js.

Important
Please note that this was originally created for internal use within the Toa project, and as such may not fully meet your specific needs or requirements.

Usage with Jest

const tomato = require('@toa.io/tomato')
const mock = { tomato }

jest.mock('@cucumber/cucumber', () => mock.tomato)

require('my-step-definitions')

const step = tomato.steps.Given('we have something')

it('should set foo to the context', () => {
  const context = {}

  step.call(context)

  expect(context.foo).toBeDefined()
})

Acronyms

tomato.steps exposes keywords as acronyms (Gi, Wh, etc.) to prevent IDE code completion duplication.

const step = tomato.steps.Gi('we have something')

Readme

Keywords

none

Package Sidebar

Install

npm i @toa.io/tomato

Homepage

toa.io

Weekly Downloads

113

Version

0.24.0-alpha.0

License

MIT

Unpacked Size

8.83 kB

Total Files

10

Last publish

Collaborators

  • agurtovoi