cucumber/cucumber-js

View on GitHub
src/step_arguments.js

Summary

Maintainability
A
0 mins
Test Coverage
import util from 'util'

export function buildStepArgumentIterator(mapping) {
  return function(arg) {
    if (arg.hasOwnProperty('rows')) {
      return mapping.dataTable(arg)
    } else if (arg.hasOwnProperty('content')) {
      return mapping.docString(arg)
    }
    throw new Error(`Unknown argument type:${util.inspect(arg)}`)
  }
}