Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #53 from truecoach/testfix/await-validate-promise
Browse files Browse the repository at this point in the history
[testfix] return promise when awaiting a run loop
  • Loading branch information
flexyford authored Dec 20, 2019
2 parents 6c6c6b4 + e0368f0 commit 865ae80
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module('Unit | Component | form-adapters/ember-changeset/ember-changeset-validat

assert.ok(this.form.get('isValid'), "the form is valid prior to submission");

await run(() => this.form.submit() );
await run(() => this.form.submit());

assert.ok(this.onvalidate.calledOnce, "onvalidate was called");
assert.ok(this.oninvalid.calledOnce, "oninvalid was called");
Expand Down Expand Up @@ -155,7 +155,7 @@ module('Unit | Component | form-adapters/ember-changeset/ember-changeset-validat
const changesetValidate = sinon.spy(this.post, "validate");

assert.ok(this.form.get('isValid'), "the form is valid prior to validation");
await run(() => { this.form.validate(); });
await run(() => this.form.validate());

assert.ok(this.onvalidate.calledOnce, "onvalidate was called");
assert.ok(changesetValidate.called, "changeset.validate was never called");
Expand Down

0 comments on commit 865ae80

Please sign in to comment.