Skip to content

Commit

Permalink
chore(deps): update dependency typescript to ~3.2.0 (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and JustinBeckwith committed Dec 2, 2018
1 parent 69c1b43 commit 23906fb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -84,7 +84,7 @@
"prettier": "^1.13.5",
"proxyquire": "^2.0.1",
"sinon": "^7.0.0",
"typescript": "~3.1.5"
"typescript": "~3.2.0"
},
"nyc": {
"exclude": [
Expand Down
2 changes: 1 addition & 1 deletion src/transaction.ts
Expand Up @@ -274,7 +274,7 @@ class Transaction extends DatastoreRequest {
* });
*/
createQuery(namespace: string, kind?: string) {
return this.datastore.createQuery.apply(this, arguments);
return this.datastore.createQuery.call(this, namespace, kind);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions system-test/datastore.ts
Expand Up @@ -25,8 +25,8 @@ describe('Datastore', () => {
// Override the Key method so we can track what keys are created during the
// tests. They are then deleted in the `after` hook.
const key = datastore.key;
datastore.key = function() {
const keyObject = key.apply(this, arguments);
datastore.key = function(options) {
const keyObject = key.call(this, options);
testKinds.push(keyObject.kind);
return keyObject;
};
Expand Down
7 changes: 3 additions & 4 deletions test/request.ts
Expand Up @@ -22,9 +22,8 @@ import * as sinon from 'sinon';
import * as through from 'through2';
import * as pfy from '@google-cloud/promisify';
import * as pjy from '@google-cloud/projectify';

const {entity} = require('../src/entity.js');
const {Query} = require('../src/query.js');
import {entity} from '../src/entity.js';
import {Query} from '../src/query.js';

let promisified = false;
const fakePfy = Object.assign({}, pfy, {
Expand Down Expand Up @@ -963,7 +962,7 @@ describe('Request', function() {
entities.push(entity);
})
.on('end', function() {
const allResults = [].slice
const allResults = ([] as Array<{}>).slice
.call(entityResultsPerApiCall[1])
.concat(entityResultsPerApiCall[2]);

Expand Down
4 changes: 1 addition & 3 deletions test/transaction.ts
Expand Up @@ -342,15 +342,13 @@ describe('Transaction', function() {

describe('createQuery', function() {
it('should return query from datastore.createQuery', function() {
const args = [0, 1, 2, 3];
const args = [0, 1];
const createQueryReturnValue = {};

transaction.datastore.createQuery = function(...ags) {
assert.strictEqual(this, transaction);
assert.strictEqual(ags[0], args[0]);
assert.strictEqual(ags[1], args[1]);
assert.strictEqual(ags[2], args[2]);
assert.strictEqual(ags[3], args[3]);
return createQueryReturnValue;
};

Expand Down

0 comments on commit 23906fb

Please sign in to comment.