Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5 #111

Closed
12 of 17 tasks
wheresrhys opened this issue Jul 12, 2016 · 8 comments
Closed
12 of 17 tasks

v5 #111

wheresrhys opened this issue Jul 12, 2016 · 8 comments

Comments

@wheresrhys
Copy link
Owner

wheresrhys commented Jul 12, 2016

  • deprecate greed option
  • implement new catch method
  • deprecate complex config
  • deprecate useNonGlobalFetch
  • Global config for sendAsJSON
  • Accept a Response object as a response in .mock() waiting on default to 200 response status node-fetch/node-fetch#132
  • Expose fetch-mock's mockResponse() internal as a utility
  • reset and restore return fetchMock instance
  • deprecate reMock
  • write upgrade notes
  • deprecate accepting an array of routes
    • bind fetchMock.mock to fetchMock so can be passed into [].map()
  • regex call matching Add filterCalls(), testCalls() #83 ???
  • API change to mock(matcher, response, options)
    • get, post, put, delete, head shorthands
    • Configure number of times a mock can be used
    • mockOnce, getOnce, postOnce etc
@montogeek
Copy link

montogeek commented Jul 13, 2016

Shorthands! 👍

@wheresrhys
Copy link
Owner Author

mainly done. Gonna go for a release

@wheresrhys
Copy link
Owner Author

#110

@wheresrhys
Copy link
Owner Author

Ah no, blocked by node-fetch/node-fetch#132

@montogeek
Copy link

montogeek commented Jul 13, 2016

Just voted it :)

@montogeek
Copy link

montogeek commented Jul 13, 2016

I just saw your commit about shorthands, what you think about PATCH (capitalized)?
Related: JakeChampion/fetch#37 and https://fetch.spec.whatwg.org/#methods

@wheresrhys
Copy link
Owner Author

If you want to add a PR for it after v5 is released I'll consider it if other users 👍 it. get, post, put, delete and head are the 'Big 5' methods, and as long as fetch-mock provides an api to target other methods I'm reasonably comfortable with leaving the shorthand coverage at that. I might add OPTINS too.

What's your use case for PATCH? I've never had to use it

@montogeek
Copy link

montogeek commented Jul 13, 2016

Sure, I will add it :)
I've used PATH neither, just thinking about giving more options to the users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants