1

次のようなコードが必要です。

describe('populate', function() {
    it('should grab ', function() {
        nock('http://someapi.com')
            .post('/attractions')
            .reply(200, [])

        return request
          .post('http://someapi.com/wrong')
          .send({destId: id})
          .catch(() => 
            expect(nock.unsatisfaedMocks()).is.eql(['http://someapi.com/wrong'])
          )
    })
})

出来ますか?

4

1 に答える 1