mercredi 7 septembre 2016

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...




Aucun commentaire:

Enregistrer un commentaire