Moonlight-io / asteroid-sdk-js

5 stars 3 forks source link

Consideration for API request mocking #14

Closed rockacola closed 4 years ago

rockacola commented 4 years ago

Purpose of this ticket is to discuss tool(s) to use in order to mock API requests (RPC and REST) as part of unit test framework.

rockacola commented 4 years ago

I'm currently using axios-mock-adapter for vega as well as previous projects.

This is not a standard approach I've seen in open source projects, but the one I've had most luck with especially dealing with RPC requests (where many mock assumes for REST, only).

rockacola commented 4 years ago

Some potential libraries for a quick search:

lllwvlvwlll commented 4 years ago

If you are using axios-mock-adapter, i'd prefer to continue using that here as well for the sake of commonality. If we need to transition later, we can, but it would be at a platform level. I have a lot of hesitancy to support multiple tools for similar purposes.

I'm also hesitant to say that we should migrate vega at the expense of feature development.