ember-cookies icon indicating copy to clipboard operation
ember-cookies copied to clipboard

`Cannot read property 'split' of undefined` error in tests when upgrading to ember 3.13.0

Open chrisvdp opened this issue 5 years ago • 1 comments

I upgraded my code base and got the error Cannot read property 'split' of undefined in my test suite in the cookie service. this.get('_document.cookie') returns undefined even though document.cookie has the value auth_redirecting=true

Screen Shot 2019-10-21 at 15 20 52

The failing test is fairly straightforward

  test('should redirect a new user to the routeAfterAuthentication page after they log in', async function(assert) {
    assert.expect(1);
    await visit('/signin');
    await authenticateSession();
    assert.ok(currentRouteName().includes('authenticated'));
    await invalidateSession();
  });

chrisvdp avatar Oct 21 '19 21:10 chrisvdp

"ember-simple-auth": "^1.9.2"

chrisvdp avatar Oct 21 '19 21:10 chrisvdp