|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
16 | 16 |
|
17 |
| -import {DecorateRequestOptions, Operation, util} from '@google-cloud/common'; |
| 17 | +import { |
| 18 | + DecorateRequestOptions, |
| 19 | + Operation, |
| 20 | + util, |
| 21 | + Metadata, |
| 22 | +} from '@google-cloud/common'; |
18 | 23 | import {MakeAuthenticatedRequestFactoryConfig} from '@google-cloud/common/build/src/util';
|
19 | 24 | import arrify = require('arrify');
|
20 | 25 | import * as assert from 'assert';
|
21 | 26 | import * as proxyquire from 'proxyquire';
|
22 |
| -import {Response} from 'request'; |
23 | 27 |
|
24 | 28 | import * as root from '../src';
|
25 | 29 | import {Project} from '../src';
|
@@ -196,7 +200,7 @@ describe('Resource', () => {
|
196 | 200 | resource.createProject(
|
197 | 201 | NEW_PROJECT_ID,
|
198 | 202 | OPTIONS,
|
199 |
| - (err: Error, p: Project, res: Response) => { |
| 203 | + (err: Error, p: Project, res: Metadata) => { |
200 | 204 | assert.strictEqual(err, error);
|
201 | 205 | assert.strictEqual(p, null);
|
202 | 206 | assert.strictEqual(res, apiResponse);
|
@@ -235,7 +239,7 @@ describe('Resource', () => {
|
235 | 239 | resource.createProject(
|
236 | 240 | NEW_PROJECT_ID,
|
237 | 241 | OPTIONS,
|
238 |
| - (e: Error, p: Project, o: Operation, res: Response) => { |
| 242 | + (e: Error, p: Project, o: Operation, res: Metadata) => { |
239 | 243 | assert.ifError(e);
|
240 | 244 | assert.strictEqual(p, project);
|
241 | 245 | assert.strictEqual(o, fakeOperation);
|
@@ -287,7 +291,7 @@ describe('Resource', () => {
|
287 | 291 | err: Error,
|
288 | 292 | projects: Project[],
|
289 | 293 | nextQuery: {},
|
290 |
| - apiResp: Response |
| 294 | + apiResp: Metadata |
291 | 295 | ) => {
|
292 | 296 | assert.strictEqual(err, error);
|
293 | 297 | assert.strictEqual(projects, null);
|
@@ -355,7 +359,7 @@ describe('Resource', () => {
|
355 | 359 | err: Error,
|
356 | 360 | projects: Project[],
|
357 | 361 | nextQuery: {},
|
358 |
| - apiResp: Response |
| 362 | + apiResp: Metadata |
359 | 363 | ) => {
|
360 | 364 | assert.ifError(err);
|
361 | 365 | assert.strictEqual(projects[0], project);
|
|
0 commit comments