Skip to content

Commit bde6592

Browse files
committed
fix(test): correct import paths in unit tests after reorganization
Fix imports from '../src/' to '../../src/' in all unit test files. Tests were moved to test/unit/ which requires going up two levels to reach the src directory.
1 parent 4072306 commit bde6592

23 files changed

+27
-27
lines changed

test/unit/create-request-body-json.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @fileoverview Tests for JSON request body creation utilities. */
22
import { describe, expect, it } from 'vitest'
33

4-
import { createRequestBodyForJson } from '../src/index'
4+
import { createRequestBodyForJson } from '../../src/index'
55

66
describe('JSON Request Body Creation', () => {
77
describe('createRequestBodyForJson', () => {

test/unit/entitlements.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { describe, expect, it } from 'vitest'
44

55
import { setupTestClient } from '../utils/environment.mts'
66

7-
import type { Entitlement, EntitlementsResponse } from '../src/index'
7+
import type { Entitlement, EntitlementsResponse } from '../../src/index'
88

99
describe('Entitlements API', () => {
1010
const getClient = setupTestClient('test-api-token', {

test/unit/file-upload-errors.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as path from 'node:path'
55

66
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
77

8-
import { createRequestBodyForFilepaths } from '../src/file-upload'
8+
import { createRequestBodyForFilepaths } from '../../src/file-upload'
99

1010
describe('createRequestBodyForFilepaths', () => {
1111
let tempDir: string

test/unit/getapi-sendapi-methods.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import nock from 'nock'
44
import { describe, expect, it } from 'vitest'
55

6-
import { SocketSdk } from '../src/index'
6+
import { SocketSdk } from '../../src/index'
77
import { setupTestClient } from '../utils/environment.mts'
88

9-
import type { SocketSdkGenericResult } from '../src/index'
9+
import type { SocketSdkGenericResult } from '../../src/index'
1010
import type { IncomingHttpHeaders, IncomingMessage } from 'node:http'
1111

1212
describe('getApi and sendApi Methods', () => {

test/unit/http-client.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import { PassThrough } from 'node:stream'
99

1010
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
1111

12-
import { MAX_RESPONSE_SIZE } from '../src/constants.js'
12+
import { MAX_RESPONSE_SIZE } from '../../src/constants.js'
1313
import {
1414
ResponseError,
1515
createGetRequest,
1616
createRequestWithJson,
1717
getErrorResponseBody,
1818
getHttpModule,
1919
getResponseJson,
20-
} from '../src/http-client.js'
20+
} from '../../src/http-client.js'
2121

2222
import type { IncomingMessage, Server } from 'node:http'
2323

test/unit/index-exports.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @fileoverview Tests for main module exports and public API surface. */
22
import { describe, expect, it } from 'vitest'
33

4-
import * as sdk from '../src/index'
4+
import * as sdk from '../../src/index'
55

66
describe('index.ts exports', () => {
77
it('should export all expected functions from http-client', () => {

test/unit/promise-queue.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
66

7-
import { PromiseQueue } from '../src/promise-queue'
7+
import { PromiseQueue } from '../../src/promise-queue'
88

99
describe('PromiseQueue', () => {
1010
let queue: PromiseQueue

test/unit/promise-with-resolvers.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @fileoverview Tests for promiseWithResolvers utility function coverage. */
22
import { describe, expect, it } from 'vitest'
33

4-
import { promiseWithResolvers } from '../src/index'
4+
import { promiseWithResolvers } from '../../src/index'
55

66
describe('Utility Functions - Promise Resolvers', () => {
77
describe('promiseWithResolvers', () => {

test/unit/query-params-normalization.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @fileoverview Tests for query parameter normalization and URL encoding. */
22
import { describe, expect, it } from 'vitest'
33

4-
import { queryToSearchParams } from '../src/index'
4+
import { queryToSearchParams } from '../../src/index'
55

66
describe('Query Parameter Normalization', () => {
77
describe('queryToSearchParams', () => {

test/unit/quota-utils.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
getQuotaUsageSummary,
1212
getRequiredPermissions,
1313
hasQuotaForMethods,
14-
} from '../src/quota-utils'
14+
} from '../../src/quota-utils'
1515

1616
describe('Quota Utils', () => {
1717
describe('getQuotaCost', () => {

0 commit comments

Comments
 (0)