antoinechalifour / memento

Memento is a development-only tool that caches HTTP calls once they have been executed.
MIT License
391 stars 11 forks source link

Using without http server #83

Open user753 opened 5 years ago

user753 commented 5 years ago

I would like to use it in tests like this

const mementoClient = MementoClient({
  cacheDirectory: path.join(__dirname, '<path to cache directory>')
});
const response = await mementoClient.request({url: 'foo', requestHeaders: [], ...})

I believe it should work faster than requests through http

antoinechalifour commented 5 years ago

Love this feature! Im adding it to my roadmap