Skip to content

Commit

Permalink
ensure can pass settled as fulfillment value to promise
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Feb 10, 2018
1 parent 2c279f5 commit 22d1538
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions addon-test-support/@ember/test-helpers/settled.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ export function isSettled() {
export default function settled() {
let options = arguments[0];

if (arguments.length > 0) {
if (options) {
assert(
`The 'settled' (formerly 'wait') testing helper only accepts an object. You passed ${options}`,
typeof options === 'object' && options !== null
typeof options === 'object'
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export function visit() {
.then(() => {
context.element = document.querySelector('#ember-testing > .ember-view');
})
.then(() => {
return settled();
});
.then(settled);
}

/**
Expand Down

0 comments on commit 22d1538

Please sign in to comment.