RickyV33 / OverView

Capstone project using the Jama Software REST API that provides a graphical representation of customer requirement relationships.
Other
1 stars 7 forks source link

Test Pagination.js #69

Closed RickyV33 closed 8 years ago

RickyV33 commented 8 years ago

Test the promise that is returned try variation of all the arguments being passed in being invalid/valid

chances commented 8 years ago

Will have to stub out the third-party request module here using proxyquire, too?

RickyV33 commented 8 years ago

Dang, that's right. we're going to have to.

ibilal commented 8 years ago

is the proxyquire something that you guys did last night?

RickyV33 commented 8 years ago

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.

chances commented 8 years ago

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.)