Skip to content

Commit 1a3cec5

Browse files
committed
chore: tidy up tests
1 parent 8778e09 commit 1a3cec5

20 files changed

Lines changed: 52 additions & 221 deletions

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"test": "jest --passWithNoTests",
99
"test:extensions": "tsc -p tsconfig.extensions.json",
1010
"test:packed": "npm run build && node test/packaging/packed-consumer-smoke.mjs",
11-
"test:types": "npm run test:extensions && tsc -p test/tsconfig.test.json --noEmit && tsc -p test/types/tsconfig.exact.json",
12-
"test:unit": "jest --passWithNoTests --runInBand test/websockets",
11+
"test:types": "npm run test:extensions && tsc -p test/tsconfig.test.json --noEmit && tsc -p test/types/tsconfig.json",
12+
"test:unit": "jest --passWithNoTests --runInBand test/unit",
1313
"lint": "eslint src"
1414
},
1515
"main": "dist/cjs/index.js",

test/REST/private.futures.read.test.ts renamed to test/integration/rest/private.futures.read.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FuturesClient } from '../../src/index.js';
1+
import { FuturesClient } from '../../../src/index.js';
22
import { getTestProxy } from '../proxy.util.js';
33

44
describe('REST PRIVATE FUTURES READ', () => {

test/REST/private.futures.write.test.ts renamed to test/integration/rest/private.futures.write.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FuturesClient } from '../../src/index.js';
1+
import { FuturesClient } from '../../../src/index.js';
22
import { getTestProxy } from '../proxy.util.js';
33

44
describe('REST PRIVATE FUTURES WRITE', () => {

test/REST/private.spot.read.test.ts renamed to test/integration/rest/private.spot.read.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SpotClient } from '../../src/index.js';
1+
import { SpotClient } from '../../../src/index.js';
22
import { getTestProxy } from '../proxy.util.js';
33

44
describe('REST PRIVATE SPOT READ', () => {

test/REST/private.spot.write.test.ts renamed to test/integration/rest/private.spot.write.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
2-
import { SpotClient } from '../../src/index.js';
2+
import { SpotClient } from '../../../src/index.js';
33
import { getTestProxy } from '../proxy.util.js';
44

55
function validateKeyPermissionException(e: any) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FuturesClient, SpotClient } from '../../src/index.js';
1+
import { FuturesClient, SpotClient } from '../../../src/index.js';
22

33
describe('REST PUBLIC', () => {
44
describe('public endpoints - SpotClient', () => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SpotClient } from '../../src/index.js';
1+
import { SpotClient } from '../../../src/index.js';
22

33
describe('REST PUBLIC', () => {
44
describe('public endpoints - SpotClient', () => {

test/packaging/browser-bundle-validation.mjs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,6 @@ export async function validateBrowserBundles({
112112
true,
113113
'REST-only bundle did not select the browser HTTPS adapter',
114114
);
115-
assert.equal(
116-
includesPath(rest.inputs, '/axios/lib/platform/browser/index.js'),
117-
true,
118-
'REST-only bundle did not select Axios browser platform code',
119-
);
120-
assert.equal(
121-
includesPath(rest.inputs, '/axios/lib/adapters/http.js'),
122-
false,
123-
'REST-only bundle included the Axios Node HTTP adapter',
124-
);
125115

126116
const websocket = await bundleFixture({
127117
absWorkingDir,
@@ -140,11 +130,6 @@ export async function validateBrowserBundles({
140130
false,
141131
'WebSocket browser bundle selected the Node.js isomorphic-ws adapter',
142132
);
143-
assert.equal(
144-
includesPath(websocket.inputs, '/node_modules/events/events.js'),
145-
true,
146-
'WebSocket browser bundle did not include the pinned EventEmitter adapter',
147-
);
148133
assert.equal(
149134
includesPath(websocket.inputs, '/lib/event-emitter.browser.js'),
150135
true,
@@ -155,16 +140,6 @@ export async function validateBrowserBundles({
155140
true,
156141
'WebSocket browser bundle did not select the browser HTTPS adapter',
157142
);
158-
assert.equal(
159-
includesPath(websocket.inputs, '/axios/lib/platform/browser/index.js'),
160-
true,
161-
'WebSocket browser bundle did not select Axios browser platform code',
162-
);
163-
assert.equal(
164-
includesPath(websocket.inputs, '/axios/lib/adapters/http.js'),
165-
false,
166-
'WebSocket browser bundle included the Axios Node HTTP adapter',
167-
);
168143
assert.equal(
169144
includesPath(websocket.inputs, '/node_modules/ws/'),
170145
false,

0 commit comments

Comments
 (0)