Feature: Method getLast for moxios.requests

This issue has been tracked since 2018-01-26.

Hello there.

It will be cool to add method getLast, that takes reverse array of moxios.requests and returns last of found.

It is valuable as mostRecent method in cases with splitting multiple logic inside moxios.wait method.

Example:

moxios.wait(() => {
  moxios
    .requests
    .getLast('post', '/foo')
    .respondWith(fooResponse)
    .then(doSomething)

  moxios
    .requests
    .getLast('post', '/bar')
    .respondWith(barResponse)
    .then(doSomething)
})
anilanar wrote this answer on 2018-05-27

Kamino cloned this issue to anilanar/moxios

More Details About Repo
Owner Name axios
Repo Name moxios
Full Name axios/moxios
Language JavaScript
Created Date 2016-05-25
Updated Date 2022-12-05
Star Count 1386
Watcher Count 20
Fork Count 85
Issue Count 19

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date