Skip to content

Instantly share code, notes, and snippets.

View markuso's full-sized avatar

Markuso markuso

View GitHub Profile
@markuso
markuso / superagent.js
Last active March 22, 2017 18:04 — forked from pherris/superagent.js
Jest superagent mock
'use strict';
// Place this in the src root /__mocks__/superagent.js
let mockPayload;
let mockDelay;
let mockError;
let mockResponse = {
status: jest.fn().mockReturnValue(200),
ok: jest.fn().mockReturnValue(true),