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

async beforeEach #186

Closed
oriSomething opened this issue Aug 29, 2015 · 7 comments
Closed

async beforeEach #186

oriSomething opened this issue Aug 29, 2015 · 7 comments

Comments

@oriSomething
Copy link

i need for some acceptance tests to run some async stuff before the the very first test

  • i've tried to return Promise didn't word in beforeEach
  • i've try to check for done() method, and i couldn't find
  • i've try to use application.deferReadiness, didn't work

i still don't want to use ES7 async functions, so is there a way to solve it?

@rwjblue
Copy link
Member

rwjblue commented Aug 29, 2015

The first two things should work (returning a promise or using assert.async).

@oriSomething
Copy link
Author

ok, the asset.async works in beforeEach (yay! thanks), but:

beforeEach() {
  return new Promise(() => null);
}

doesn't seem delay even in a miliseconds

@rwjblue
Copy link
Member

rwjblue commented Aug 29, 2015

What version of ember-qunit?
Are you using the native promise implementation (looked like it in your snippet)?

@oriSomething
Copy link
Author

qunit:

  "name": "ember-cli-qunit",
  "version": "1.0.1",

I'm using Ember.RSVP.Promise. every time i'm using promises, on the top of the file i'm using this const { Promise } = Ember.RSVP

@rwjblue
Copy link
Member

rwjblue commented Aug 29, 2015

The ember-qunit version is stored in the bower.json (and is different from the ember-cli-qunit version).

@oriSomething
Copy link
Author

yep, my mistake. got it after i got out of home. anyway...:

"ember-qunit": "0.4.9",   
"qunit": "~1.18.0"

@Turbo87
Copy link
Member

Turbo87 commented Oct 14, 2017

I'm pretty sure this works by now, so I'm going to go ahead and close this issue. Please reopen if this is still a problem.

@Turbo87 Turbo87 closed this as completed Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants