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();
});