James
James

Reputation: 1293

EmberJS Testing always passes

New to EmberJS. I'm trying to get some testing going.. but having some basic trouble it seems. I simply generated an acceptance test -- taken straight from the Ember site.

import { test } from 'qunit';
import moduleForAcceptance from 'ssd-admin-ember/tests/helpers/module-for-acceptance';

moduleForAcceptance('Acceptance | login');

test('visiting /login', function(assert) {
  visit('/xxxlogin');

  andThen(function() {
    assert.equal(currentURL(), '/abclogin');
  });
});

I then run it with:

ember test --filter 'acceptance/login-test'

This yields...

ok 1 PhantomJS 2.1 - JSHint | acceptance/login-test.js: should pass jshint

1..1
# tests 1
# pass  1
# skip  0
# fail  0
# ok

How can this possibly pass? There is no xxxlogin route etc.

I must be doing something wrong (clearly).

Thanks in advance...

Upvotes: 0

Views: 75

Answers (1)

ykaragol
ykaragol

Reputation: 6221

You are not running your test. You only run the JSHint checks. And it is ok for that file.

You are not running your test because your filter statement is wrong. It should be:

ember test --filter "Acceptance | login"

Upvotes: 1

Related Questions