Replies: 1 comment
-
You can do some initial debugging to see the values you receive inside your hooks. For example: Console log the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there 👋
I'm running test on AdonisJS 5. Now I'm gonna mention some errors.
I've run HTTP tests for CRUD operations and I've reached Update tests. i.e., I send PUT requests to my update function in Controller. There is no problem about relationships.
I used update function that comes after query() function and updateOrCreate function for updating, result was the same at both.
I've got errors when the following line that is in controller's update function been executed:
I'm using an afterFetch hook for preloading specified as following:
And I get the following error when I run tests:
Also I've a model named as AdvertisementSuperFeature and there is another strange error. A part of the model and its afterFetch hook:
And its error:
BOMB: When I check the DB, althought errors, result is that I expected.
It's look like I'm in trouble with hooks 🤣
What should I do?
Beta Was this translation helpful? Give feedback.
All reactions