I have a simple acceptance test written in the modern RFC 268 format for Ember 3.0
.
The test is for a page where, if the user is unauthenticated, the URL immediately redirects to /login
.
...
module('Acceptance | index', function (hooks) {
setupApplicationTest(hooks);
test('visiting / logged out', async function(assert) {
assert.expect(1);
// Test hangs here forever.
await visit('/');
assert.equal(currentURL(), '/login');
});
});
This test worked great using the older format with moduleForAcceptance
.
Unfortunately, this test hangs forever in Ember 3.0
. Am I missing something here? Is there a better way to test a redirect?
There are no errors in the console, and the addition of some console.log
statements show that the await
is where the test hangs.
Aucun commentaire:
Enregistrer un commentaire