Skip to content

Instantly share code, notes, and snippets.

Created August 17, 2018 02:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
2017/03/13/ensure-all-nock-interceptors-are-used.html - simple-example-nock.js
'use strict';
const assert = require('chai').assert;
const nock = require('nock');
const request = require('supertest');
const uniqueValue = 'da64daaf-182b-4af6-a4af-09727bf8d5aa';
const app = require('../../src/server');
describe('server', function() {
it('GET / once', function() {
.reply(200, uniqueValue);
return request(app)
.then(res => assert.equal(res.text, uniqueValue));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment