Skip to content

Commit

Permalink
chore: Bumping test dependencies. eslint bumped to version 6 (#791)
Browse files Browse the repository at this point in the history
Co-authored-by: Minh Nguyen Cong <mcong@box.com>
  • Loading branch information
antusus and congminh1254 authored Jan 5, 2023
1 parent 6bfc1ee commit 5331628
Show file tree
Hide file tree
Showing 13 changed files with 6,648 additions and 4,945 deletions.
11,534 changes: 6,622 additions & 4,912 deletions package-lock.json

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/bluebird": "^3.5.35",
"@types/node": "^15.3.1",
"ajv": "^6.12.3",
"bluebird": "^3.7.1",
"bluebird": "^3.7.2",
"http-status": "^1.4.1",
"jsonwebtoken": "^8.5.1",
"merge-options": "^1.0.1",
Expand All @@ -59,14 +59,14 @@
"@types/uuid": "^8.3.0",
"better-docs": "^2.3.2",
"chai": "^4.2.0",
"doctoc": "^2.0.1",
"eslint": "^4.19.1",
"doctoc": "^2.2.1",
"eslint": "^6.8.0",
"eslint-plugin-jest": "^23.20.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^4.0.3",
"istanbul": "^0.4.3",
"jest": "^27.3.0",
"jest": "^27.5.1",
"jsdoc": "^3.6.3",
"jsonlint": "^1.6.3",
"jsonlint2": "^1.7.1",
Expand All @@ -75,24 +75,19 @@
"mocha": "^6.0.0",
"mockery": "^2.1.0",
"nock": "^9.6.1",
"npm-force-resolutions": "0.0.3",
"npm-upgrade": "^3.0.0",
"nyc": "^14.0.0",
"prettier": "^2.3.2",
"shelljs": "^0.8.5",
"shelljs-nodecli": "^0.1.1",
"sinon": "^7.5.0",
"standard-version": "^9.3.2",
"ts-jest": "^27.0.7",
"ts-jest": "^27.1.4",
"ts-node": "^10.2.0",
"typescript": "^4.2.4"
},
"files": [
"config",
"lib"
],
"resolutions": {
"handlebars": "4.5.3",
"minimist": "1.2.5"
}
]
}
5 changes: 5 additions & 0 deletions tests/endpoint-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1524,8 +1524,10 @@ describe('Endpoint', () => {
'files/get_files_id_representations_multiple_200'
),
repsObj = JSON.parse(repsFixtureMultiple),
/* eslint-disable node/no-deprecated-api */
repPDFURL = url.parse(repsObj.representations.entries[1].info.url)
.pathname,
/* eslint-disable node/no-deprecated-api */
repTextURL = url.parse(repsObj.representations.entries[2].info.url)
.pathname,
repFixturePDFPending = getFixture(
Expand Down Expand Up @@ -1606,6 +1608,7 @@ describe('Endpoint', () => {
'files/get_files_id_representations_png_200'
),
repsObj = JSON.parse(repsFixture),
/* eslint-disable node/no-deprecated-api */
repInfoURL = url.parse(repsObj.representations.entries[0].info.url)
.pathname,
repPendingFixture = getFixture(
Expand Down Expand Up @@ -1659,6 +1662,7 @@ describe('Endpoint', () => {
'files/get_files_id_representations_png_200'
),
repsObj = JSON.parse(repsFixture),
/* eslint-disable node/no-deprecated-api */
repInfoURL = url.parse(repsObj.representations.entries[0].info.url)
.pathname,
repPendingFixture = getFixture(
Expand All @@ -1668,6 +1672,7 @@ describe('Endpoint', () => {
'files/get_representation_info_success_200'
),
repInfo = JSON.parse(repSuccessFixture),
/* eslint-disable node/no-deprecated-api */
contentURL = url.parse(repInfo.content.url_template),
contentDomain = `${contentURL.protocol}//${contentURL.host}`,
contentPath = decodeURIComponent(contentURL.pathname),
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_test/__tests__/collaborations.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Collaborations manager', () => {
beforeAll(async() => {
context.appClient = getAppClient();
context.user = await createBoxTestUser(context.appClient);
context.collaborator = await createBoxTestUser(context.appClient, );
context.collaborator = await createBoxTestUser(context.appClient );
context.user = await createBoxTestUser(context.appClient);
context.client = getUserClient(context.user.id);
context.folder = await createBoxTestFolder(context.client);
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_test/objects/box-test-folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const utils = require('../lib/utils');


const createBoxTestFolder = async(client, name = null, parent_folder_id = '0') => {
let folder = await client.folders.create(parent_folder_id, name || utils.randomName());
const createBoxTestFolder = async(client, name = null, parentFolderId = '0') => {
let folder = await client.folders.create(parentFolderId, name || utils.randomName());
folder.dispose = async function() {
await client.folders.delete(folder.id, { recursive: true });
await client.folders.deletePermanently(folder.id);
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/api-request-manager-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* @fileoverview Tests for Box API Request
*/

/* global describe, it, before, beforeEach, after, afterEach */

'use strict';

// ------------------------------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions tests/lib/api-request-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
* @fileoverview Tests for Box API Request
*/

/* eslint no-new: 0 */
/* global describe, it, before, beforeEach, after, afterEach */

'use strict';

// ------------------------------------------------------------------------------
Expand Down Expand Up @@ -89,6 +86,7 @@ describe('APIRequest', function() {

it('should throw when no config object is passed to constructor', function() {
assert.throws(function() {
/* eslint-disable no-new */
new APIRequest('Not a config');
});
});
Expand All @@ -100,6 +98,7 @@ describe('APIRequest', function() {

it('should throw when invalid event bus is passed to constructor', function() {
assert.throws(function() {
/* eslint-disable no-new */
new APIRequest(config, 'not an event emitter');
});
});
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/sessions/app-auth-session-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* @fileoverview Tests for App Auth Box API Session.
*/

/* global describe, it, before, beforeEach, after, afterEach */

'use strict';

// ------------------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/sessions/basic-session-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* @fileoverview Tests for Basic Box API Session.
*/

/* global describe, it, before, beforeEach, after, afterEach */

'use strict';

// ------------------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/sessions/ccg-session-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* @fileoverview Tests for Anonymous Box API Session.
*/

/* global describe, it, before, beforeEach, after, afterEach */

'use strict';

// ------------------------------------------------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions tests/lib/sessions/persistent-session-test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/**
* @fileoverview Tests for Basic Box API Session.
*/
/* eslint no-new: 0 */
/* global describe, it, before, beforeEach, after, afterEach */

'use strict';

Expand Down Expand Up @@ -84,17 +82,20 @@ describe('PersistentAPISession', function() {

it('should throw an exception when not given any tokenInfo', function() {
assert.throws(function() {
/* eslint-disable no-new */
new PersistentAPISession({ bogus: 'data' });
});
});

it('should throw an exception when given an invalid tokenInfo', function() {
assert.throws(function() {
/* eslint-disable no-new */
new PersistentAPISession(null);
});
assert.throws(function() {
var invalidTokenInfo = Object.create(testTokenInfo);
invalidTokenInfo.refreshToken = undefined;
/* eslint-disable no-new */
new PersistentAPISession(invalidTokenInfo);
});
});
Expand All @@ -108,9 +109,11 @@ describe('PersistentAPISession', function() {
};

assert.throws(function() {
/* eslint-disable no-new */
new PersistentAPISession(testTokenInfo, tokenStoreMissingGet);
});
assert.throws(function() {
/* eslint-disable no-new */
new PersistentAPISession(testTokenInfo, tokenStoreMissingSet);
});
});
Expand Down
5 changes: 3 additions & 2 deletions tests/lib/util/config-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* @fileoverview Tests for Config
*/

/* eslint no-new: 0 */
/* global describe, it, before, beforeEach, after, afterEach */

'use strict';

Expand Down Expand Up @@ -40,6 +38,7 @@ describe('Config', function() {
it('should throw when client ID is not passed', function() {

assert.throws(function() {
/* eslint-disable no-new */
new Config({
clientID: null
});
Expand All @@ -59,6 +58,7 @@ describe('Config', function() {
it('should throw when passed params would override instance method', function() {

assert.throws(function() {
/* eslint-disable no-new */
new Config({
clientID: 'id',
clientSecret: 'secret',
Expand Down Expand Up @@ -179,6 +179,7 @@ describe('Config', function() {
it('should throw when passed invalid app auth config data', function() {

assert.throws(function() {
/* eslint-disable no-new */
new Config({
clientID: 'id',
clientSecret: 'secret',
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/util/url-path-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
* @fileoverview Tests for URL Path Builder
*/

/* global describe, it, before, beforeEach, after, afterEach */

'use strict';

// ------------------------------------------------------------------------------
Expand Down

0 comments on commit 5331628

Please sign in to comment.