check the .pendingMocks()
after each test and don't share mocks between tests
describe('channel', function() {
beforeEach(function() {
nock.cleanAll()
})
afterEach(function() {
expect(nock.pendingMocks()).lengthOf(0, nock.pendingMocks());
});
it('some test with mocks', function() {
// ...
})
})
Use chai for checking the querystring. It will give you much better error message
.query(function(qObj) {
return expect(qObj).include({
x: '13', y: '52',
accessId: '05051dad8ad9ea621e2ef671c9ea18ad',
radius: '500', max: '10',
lang: 'en-US'
})
})