This repository was archived by the owner on Apr 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +12
-39
lines changed
Expand file tree Collapse file tree 4 files changed +12
-39
lines changed Original file line number Diff line number Diff line change 4242 "gts" : " ^1.0.0" ,
4343 "intelli-espower-loader" : " ^1.0.1" ,
4444 "js-green-licenses" : " ^0.5.0" ,
45+ "linkinator" : " ^1.1.2" ,
4546 "mkdirp" : " ^0.5.1" ,
4647 "mocha" : " ^6.0.0" ,
4748 "ncp" : " ^2.0.0" ,
4849 "nock" : " ^10.0.0" ,
4950 "nyc" : " ^14.0.0" ,
5051 "post-install-check" : " 0.0.1" ,
5152 "proxyquire" : " ^2.0.0" ,
52- "request" : " ^2.88.0" ,
5353 "require-inject" : " ^1.4.3" ,
5454 "source-map-support" : " ^0.5.6" ,
55+ "teeny-request" : " ^3.11.3" ,
5556 "typescript" : " ~3.4.0" ,
56- "uuid" : " ^3.3.2" ,
57- "linkinator" : " ^1.1.2"
57+ "uuid" : " ^3.3.2"
5858 },
5959 "dependencies" : {
6060 "@google-cloud/common" : " ^1.0.0" ,
Original file line number Diff line number Diff line change 1515 */
1616
1717import { GoogleAuthOptions , Service } from '@google-cloud/common' ;
18- import * as request from 'request' ; // Only for type declarations.
1918
2019export interface PackageInfo {
2120 name : string ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,16 +20,22 @@ import * as nock from 'nock';
2020import { Debug } from '../src/client/stackdriver/debug' ;
2121import { Debuggee } from '../src/debuggee' ;
2222import * as stackdriver from '../src/types/stackdriver' ;
23-
24- import { authRequest as request } from './auth -request' ;
23+ import * as r from 'request' ; // types only
24+ import { teenyRequest } from 'teeny -request' ;
2525
2626// the tests in this file rely on the GCLOUD_PROJECT environment variable
2727// not being set
2828delete process . env . GCLOUD_PROJECT ;
2929
3030import { Controller } from '../src/agent/controller' ;
3131// TODO: Fix fakeDebug to actually implement Debug.
32- const fakeDebug : Debug = ( { request} as { } ) as Debug ;
32+ const fakeDebug = ( {
33+ request : ( options : r . Options , cb : r . RequestCallback ) => {
34+ teenyRequest ( options , ( err , r ) => {
35+ cb ( err , r ? r . body : undefined , r ) ;
36+ } ) ;
37+ } ,
38+ } as { } ) as Debug ;
3339
3440const agentVersion = `SomeName/client/SomeVersion` ;
3541const url = 'https://clouddebugger.googleapis.com' ;
You can’t perform that action at this time.
0 commit comments