benawad/type-graphql-series

Register resolver test returns null

Closed this issue · 6 comments

Register functionality is doing fine but the test seems to return null on data.
Register › create user

expect(received).toMatchObject(expected)

- Expected
+ Received

  Object {
-   "data": Object {
-     "register": Object {
-       "email": "Kurtis_Hamill53@hotmail.com",
-       "firstName": "Reginald",
-       "lastName": "Windler",
-     },
-   },
+   "data": null,
  }

  44 |     });
  45 | 

at src/modules/user/register/Register.test.ts:46:22
at fulfilled (src/modules/user/register/Register.test.ts:5:58)

Is this after cloning the project?

First followed along, then just copied the source dir since config would be different

Try adding some console.logs to see why the resolver returns null

Hi thanks for your prompt response, i'll update this on the weekend.
PS: Thanks for your tutorial sir. Maybe start a patreon/Subscribe star

Started running all the same. Prob env issue