Skip to content

Instantly share code, notes, and snippets.

View gist:b207ce3257d61228425a13f8363b0043
https://send.firefox.com/download/2a30af40b5/#KS_0oSm3wKbsDJJLwStC4Q
@tux4
tux4 / axios-test.js
Last active Apr 9, 2020
Jest mock for axios.js
View axios-test.js
/* Jest test of axios XHR calls */
describe('axios', function() {
var axios;
beforeEach(function() {
axios = require('axios');
});
pit('successful mock HTTP request', function() {
var reqP = axios
You can’t perform that action at this time.