23 Commits

Author SHA1 Message Date
Dan Hough
219e5c935e Can now create partially-matched query string request endpoints. Closes #20 2014-06-20 11:14:57 +01:00
Dan Hough
54362db964 Fixed a bug where delay wasn't working in the fluent interface. Bumped v to 1.7.2 2014-06-20 11:13:21 +01:00
Dan Hough
9d3732b6fb v1.7.1 Made root path work by more traditional methods 2014-06-06 10:13:39 +01:00
Dan Hough
a46d137d80 Added API Root ability. Name up for debate if anybody has an opinion. 2014-06-06 09:25:16 +01:00
Bryce Gibson
9339f531f7 Add a callback argument to Interfake.listen 2014-05-07 18:35:58 +10:00
Dan Hough
7a061f32a0 Updated to v1.6. Headers now supported. 2014-04-10 22:47:35 +02:00
Dan Hough
d9ec431570 Updated README to include query bit 2014-04-10 22:09:54 +02:00
Dan Hough
f4fa8f0e77 Wrote an extremely complex test for a simple CRUD API 2014-04-10 22:00:03 +02:00
Dan Hough
cb6a5493d6 Fluent interface for query now works properly even with creation of post-response endpoints 2014-04-10 21:39:16 +02:00
Dan Hough
108f2d5b9c Allows the url component to have query strings w/o fluent 2014-04-10 19:50:22 +02:00
Dan Hough
5e17944d61 Now supporting query params in the fluent interface for #12 2014-04-10 19:23:14 +02:00
Dan Hough
c53dd2d644 A couple of linter fixes and updated readme 2014-04-02 23:40:47 +02:00
Dan Hough
537eac995f Fixed a couple of minor linting errors 2014-04-02 23:21:33 +02:00
Dan Hough
ce53757b76 Removed self and made interfake a module-local obj which is beforeEach set up 2014-04-02 23:20:52 +02:00
Rajit Singh
9d88d61f18 Add support for handling query params
Added createRouteHash() to maintain canonical form of a request.
Use lookup table to store expected responses, with route-hash as key.
Add tests to confirm query params work.
All tests pass, with modifications.
Added afterEach() to ensure interfake.stop() is called after each test, even if the test fails.
2014-03-28 17:21:48 +01:00
Dan Hough
7637524ddb Rebased with bruce-one's changed
Removed lodash dependency and replaced it with core-utils-is. Don't need all of lodash just yet. Closes #9
2014-03-27 22:07:25 +01:00
Bryce Gibson
46c30ea11a Test both the upper and lower end of a delay range 2014-03-24 16:38:36 +11:00
Bryce Gibson
0c66c02e8f Support for delaying responses a random amount within a specified range 2014-03-24 16:14:45 +11:00
Dan Hough
7420ae0609 Small changes to style 2014-03-21 13:06:04 +00:00
Bryce Gibson
9dad159046 Reduce the delays in the test suite 2014-03-21 08:25:45 +11:00
Bryce Gibson
27013bb761 Adding a delay fluent method 2014-03-21 08:23:29 +11:00
Bryce Gibson
c9f1b40d88 Add a delay parameter for responses.
Basic support for specifying that a response should be delay be an amount of millis.
2014-03-19 14:02:04 +11:00
Dan Hough
a0425f7ac1 Put tests into the appropriate files. Fixed _request semantics 2014-03-16 19:42:10 +01:00