How to use the fake-cucumber.When function in fake-cucumber

To help you get started, we’ve selected a few fake-cucumber examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cucumber / cucumber / cucumber-compatibility-kit / javascript / features / attachments / attachments.ts View on Github external
import { When } from 'fake-cucumber'

When('the string {word} is attached as {word}', function(
  text: string,
  contentType: string
) {
  this.attach(text, contentType)
})
github cucumber / cucumber / cucumber-json-formatter / javascript / features / step_definitions / steps.ts View on Github external
import { Given, Then, When } from 'fake-cucumber'

Given('a passed {word}', (word: string) => undefined)

Given('a passed {word} with', (word: string, arg: any) => undefined)

Given('a passed {word} with text attachment {string}', function(word: string, attachmentText: string) {
  this.attach(attachmentText, 'text/plain')
})

When('a failed {word}', () => {
  throw new Error('Some error')
})

When('a failed {word} with', () => {
  throw new Error('Some error')
})

Then('a skipped {word}', (word: string) => {
  throw new Error('Should never be called')
})
github cucumber / cucumber / cucumber-json-formatter / javascript / features / step_definitions / steps.ts View on Github external
import { Given, Then, When } from 'fake-cucumber'

Given('a passed {word}', (word: string) => undefined)

Given('a passed {word} with', (word: string, arg: any) => undefined)

Given('a passed {word} with text attachment {string}', function(word: string, attachmentText: string) {
  this.attach(attachmentText, 'text/plain')
})

When('a failed {word}', () => {
  throw new Error('Some error')
})

When('a failed {word} with', () => {
  throw new Error('Some error')
})

Then('a skipped {word}', (word: string) => {
  throw new Error('Should never be called')
})

fake-cucumber

Fake Cucumber generates fake results

MIT
Latest version published 5 years ago

Package Health Score

53 / 100
Full package analysis