Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix waitFor return value documentation #386

Merged
merged 2 commits into from
Jun 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ interim DOM states (e.g. loading states, pending promises, etc).
- `options.count` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** the number of elements that should match the provided selector (null means one or more) (optional, default `null`)
- `options.timeoutMessage` (optional, default `'waitFor timed out'`)

Returns **([Element](https://developer.mozilla.org/docs/Web/API/Element) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Element](https://developer.mozilla.org/docs/Web/API/Element)>)** the element (or array of elements) that were being waited upon
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<([Element](https://developer.mozilla.org/docs/Web/API/Element) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Element](https://developer.mozilla.org/docs/Web/API/Element)>)>** resolves when the element(s) appear on the page

### waitUntil

Expand Down
2 changes: 1 addition & 1 deletion addon-test-support/@ember/test-helpers/dom/wait-for.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { nextTickPromise } from '../-utils';
@param {Object} [options] the options to be used
@param {number} [options.timeout=1000] the time to wait (in ms) for a match
@param {number} [options.count=null] the number of elements that should match the provided selector (null means one or more)
@returns {Element|Array<Element>} the element (or array of elements) that were being waited upon
@return {Promise<Element|Element[]>} resolves when the element(s) appear on the page
*/
export default function waitFor(
selector,
Expand Down