title: How to test HTTP Only Cookie Set using Axios
body: <p>To preface this, I am using Express, and Jest + Axios to do E2E tests.</p>
  <p>I have a test suite, where I am creating a user, and I would like the test to assert that the HTTP-ONLY cookie was set during the process.</p>
  <p>I know these HTTP-ONLY cookies are not supposed to be read by the browser, however I am wondering if there is any easy way to test this.</p>
  <p>Here is some pseudocode of my current flow.</p>
  <pre><code>it('Should Create a User', async () =&gt; {
    const account = {
      username: faker.internet.userName(),
      password: faker.internet.password(),
    };
    const axiosRes = await axios.post(`/auth/create`, account);
    const user = await userRepository.getByName(account.username);
    expect(user.username).toEqual(account.username);
  
    // What I would like to test
    expect(axiosRes.cookie('jwtToken').isSet());
  });
  
  </code></pre>
  <p>Edit: Is my best route to set the token in a header?</p>