8000 Update and rename getToken.test.ts to getTokenWithProxy.test.ts · enggaraziz/threads-api@f3ab424 · GitHub
[go: up one dir, main page]

Skip to content

Commit f3ab424

Browse files
authored
Update and rename getToken.test.ts to getTokenWithProxy.test.ts
Add proxy for getToken option
1 parent 557ef40 commit f3ab424

File tree

1 file 8000 changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

threads-api/__test__/getToken.test.ts renamed to threads-api/__test__/getTokenWithProxy.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import { ThreadsAPI } from '../src/threads-api';
22
import { TIMEOUT, rawCredentials as credentials } from './utils/constants';
33
import { describeIf } from './utils/describeIf';
4+
import * as HttpsProxyAgent from "https-proxy-agent";
5+
6+
// Proxy server details
7+
var proxy = 'http://PROXYUSERNAME:PROXYPWD@PROXYHOST:PROXYPORT';
48

59
describeIf(!!credentials)('getToken', () => {
610
const threadsAPI = new ThreadsAPI({
711
verbose: true,
12+
httpsAgent: new HttpsProxyAgent.HttpsProxyAgent(proxy),
813
...credentials,
914
});
1015

0 commit comments

Comments
 (0)
0