Skip to content

Commit

Permalink
spellcheck. Thanks @jennifer-shehane :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Mar 23, 2018
1 parent 4d00331 commit 58b6ce5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Cypress.Commands.add('getByLabelText', (...args) => {
return cy
.window()
.then(({document}) =>
getComandWaiter(document, () =>
getCommandWaiter(document, () =>
queries.queryByLabelText(document, ...args),
)(),
)
Expand All @@ -19,11 +19,13 @@ Cypress.Commands.add('getByText', (...args) => {
return cy
.window()
.then(({document}) =>
getComandWaiter(document, () => queries.queryByText(document, ...args))(),
getCommandWaiter(document, () =>
queries.queryByText(document, ...args),
)(),
)
})

function getComandWaiter(container, fn) {
function getCommandWaiter(container, fn) {
return function waiter() {
const val = fn()
if (val) {
Expand Down

0 comments on commit 58b6ce5

Please sign in to comment.