mainmatter / ember-cookies

Cookies abstraction for Ember.js that works both in the browser as well as with Fastboot on the server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

chrisvdp opened this issue · 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();
  });

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