`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
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"