Skip to content

Commit

Permalink
removed delay option getting passed to toMatchElement
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Koval committed Apr 30, 2018
1 parent cd3d3b1 commit 84841d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/expect-puppeteer/src/matchers/toFill.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import toMatchElement from './toMatchElement'

async function toFill(instance, selector, value, options) {
const element = await toMatchElement(instance, selector, options)
const { delay, ...toMatchElementOptions } = options || {}
const element = await toMatchElement(instance, selector, toMatchElementOptions)
await element.click({ clickCount: 3 })
await element.type(value, {
delay: options && options.delay,
delay,
})
}

Expand Down

0 comments on commit 84841d1

Please sign in to comment.