Skip to content

Instantly share code, notes, and snippets.

@sergueyarellano
Created May 26, 2021 14:16
Show Gist options
  • Save sergueyarellano/696062ae3a40f8c84a79ba91b62a2fd2 to your computer and use it in GitHub Desktop.
Save sergueyarellano/696062ae3a40f8c84a79ba91b62a2fd2 to your computer and use it in GitHub Desktop.
const get = require('lodash.get')
defineStep('{string} property has more than {int} element', async function (property, number) {
const propFromResponse = get(this.response, property, [])
const actual = propFromResponse.length > number
const expected = true
deepStrictEqual(actual, expected)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment