How to use the jest-mock-axios.lastReqGet function in jest-mock-axios

To help you get started, weā€™ve selected a few jest-mock-axios examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Zilliqa / Zilliqa-JavaScript-Library / packages / zilliqa-js-blockchain / src / __tests__ / chain.spec.ts View on Github external
blockchain.createTransaction(tx).then(() => {
      const req = mockAxios.lastReqGet().data;
      expect(req.params[0]).toHaveProperty('signature');
      expect(req.params[0]).toHaveProperty('pubKey');
    });
  });