Skip to content

Commit 0864d26

Browse files
chore: remove nock test
1 parent 04f168a commit 0864d26

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

test/unit/offline.test.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,5 @@ describe('offline tests', () => {
1717
it('should return a 404 for bogus urls', (done) => {
1818
request(app).get('/foo/bar').expect(404, done);
1919
});
20-
21-
it('should fetch and return a token for GET /api/v1/credentials', (done) => {
22-
const fakeToken = {
23-
token: 'faketoken',
24-
serviceUrl: 'https://stream.watsonplatform.net/speech-to-text/api',
25-
};
26-
27-
nock('https://stream.watsonplatform.net:443', { encodedQueryParams: true })
28-
.get('/authorization/api/v1/token')
29-
.query({ url: 'https://stream.watsonplatform.net/speech-to-text/api' })
30-
.reply(200, fakeToken, {
31-
connection: 'close',
32-
'transfer-encoding': 'chunked',
33-
'content-type': 'text/xml',
34-
'x-dp-watson-tran-id': 'stream-dp01-34302424',
35-
date: 'Tue, 29 Mar 2016 19:50:27 GMT',
36-
});
37-
38-
request(app).get('/api/v1/credentials').expect(200, fakeToken, done);
39-
});
4020
});
4121
});

0 commit comments

Comments
 (0)