Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Thorny Road to Seamless Mocks

The Thorny Road to Seamless Mocks

Mimic.js is an open source tool for imitating server responses purely on the client-side. In this talk you will learn about the tool, the technical challenges we faced trying to make it unobtrusive for your application, and real-life problems we had, have and will have by making it open-source.

Avatar for Ilya Gelman

Ilya Gelman

March 16, 2017

More Decks by Ilya Gelman

Other Decks in Programming

Transcript

  1. Ilya Gelman Head of NYC Office @ 500Tech Organizer of

    meetups and conferences Wrote a book on Redux Developing, consulting and teaching
  2. learning curve special configuration synchronization with team members updating mocks

    when API changes registration on 3rd party websites integration tests ☹ custom non-CRUD endpoints another tab in the terminal
  3. ?

  4. GET POST /users?all=true /users Save Matched Request POST /users {

    name: "Alex" } name: "Alex" Successful GET Successful sign-in Slow server Status code Delay Response headers Response data 201 0 ms [created] All mocked requests Scenarios + Captured requests Mocked requests Successful GET Slow GET + Create new state… Remove state Unmock * refetch real data TA DA!!!
  5. Open source secret: No one cares about your project unless

    it’s popular (and when it is, you wish people would care less)
  6. Fetch API Web Workers React Native Remote mocks Webpack integration

    Recording requests Export Import Import Filters Rich API Scenarios/Groups Request names Headers editor Wildcards
  7. CSS

  8. Iframe - API is hard as hell to implement CSS

    `all` property - doesn’t work in IE and Edge CSS reset - !important would still break things