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

'assert' is undefined #142

Closed
funtusov opened this issue Feb 17, 2015 · 2 comments
Closed

'assert' is undefined #142

funtusov opened this issue Feb 17, 2015 · 2 comments

Comments

@funtusov
Copy link

After upgrading to the latest ember-qunit and ember-cli(0.2 beta1), when I try to refactor tests to use assert.ok/equal instead of ok/equal, the tests throw an error that assert can't be found.

QUnit.assert works properly. I tried to add assert to the test jshint predef. Am I missing some configuration?

@rwjblue
Copy link
Member

rwjblue commented Feb 17, 2015

assert is just the commonly used argument to your test. It can be anything you want though:

test('some stuff happens', function(assert) {
  assert.expect(1);
  /* awesome stuff */
  assert.ok(true, 'its happening!!');
});

@rwjblue rwjblue closed this as completed Feb 17, 2015
@funtusov
Copy link
Author

Thanks a lot, I've totally missed it being passed as an argument.

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

2 participants