glynnbird commented on code in PR #314: URL: https://github.com/apache/couchdb-nano/pull/314#discussion_r1827538434
########## test/attachment.insert.test.js: ########## @@ -82,31 +85,45 @@ test('should detect missing parameters (callback) - db.attachment.insert', () => test('should be able to insert document attachment as stream - PUT /db/docname/attachment - db.attachment.insert', async () => { // mocks const response = { ok: true, id: 'docname', rev: '2-456' } - const scope = nock(COUCH_URL, { reqheaders: { 'content-type': 'image/jpg' } }) - .put('/db/docname/logo.jpg?rev=1-150', image2) - .reply(200, response) + mockPool.intercept({ + method: 'put', + path: '/db/docname/logo.jpg?rev=1-150', + body: (value) => { Review Comment: iirc it's testing for not falling over when the stream contains a reference to itself - I can't remember why that used to be an issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org