benawad / graphql-ts-server-boilerplate

A GraphQL server boilerplate made with Typescript, PostgreSQL, and Redis
695 stars 181 forks source link

session problems #4

Closed 4ware closed 6 years ago

4ware commented 6 years ago

Hi! I get the following error. Do you have any idea what went wrong?

` FAIL src/modules/User/me/me.test.ts ● me › return null if no cookie

expect(received).toBeNull()

Expected value to be null, instead received
  {"email": "Ulises_Howe@yahoo.com", "id": "70541c8f-ac16-4176-9f3a-ad1b51f69146"}

  40 |     const client = new TestClient(process.env.TEST_HOST as string);
  41 |     const response = await client.me();
> 42 |     expect(response.data.me).toBeNull();
  43 |   });
  44 |
  45 |   test("get current user", async () => {

  at Object.<anonymous> (src/modules/User/me/me.test.ts:42:30)
  at fulfilled (src/modules/User/me/me.test.ts:4:56)

`

benawad commented 6 years ago

Looks like it's getting a session from somewhere. Try running the test by itself

4ware commented 6 years ago

Thanks! I'll look into it.