Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Add unit tests for read() of customer controller#412

Open
tsukimi2 wants to merge 13 commits intofreeCodeCamp:stagingfrom
tsukimi2:testing/customer_controller
Open

Add unit tests for read() of customer controller#412
tsukimi2 wants to merge 13 commits intofreeCodeCamp:stagingfrom
tsukimi2:testing/customer_controller

Conversation

@tsukimi2
Copy link
Contributor

No description provided.

@tsukimi2
Copy link
Contributor Author

@jspaine I tried to test out whether my code is part of the problem of triggering the test fail on a different part of the code and it seems that whenever I include the customerCtrl.read(req, res) (e.g. in line 92 of server/controllers/customer.spec.js), it will cause the test failure. However, I still couldn't figure out how invoking the read function of the customer controller (which merely consists of the single line res.json(req.customer)) can actually trigger the test failure in a user API signup test. I've been reading the code of both the controller controller and the user controller's signup but can't seem to see from the code how one can affect the other. It'll be great if you could help me a bit on this issue. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant