Closed RickyV33 closed 8 years ago
Will have to stub out the third-party request
module here using proxyquire, too?
Dang, that's right. we're going to have to.
is the proxyquire something that you guys did last night?
I added it in this morning, but it's something we realized we needed last night in order to test request(...) in pagination. Not everyone who runs this test will have the same username/password for their accounts, so you can stub out the request and have it return a response on a certain username/password combo and error on others.
It's also to help ensure that our unit tests only test the single unit on its own. We don't want our unit tests depending on however some external system operates. (i.e. The pagination module shouldn't depend on the real implementation of the request module.)
Test the promise that is returned try variation of all the arguments being passed in being invalid/valid