Skip to content

Commit 4da6ffe

Browse files
committed
Fix test import paths
Update test imports to use @socketsecurity/lib aliases instead of relative paths. This fixes 5 out of 6 failing test suites (187 passing tests). Changes: - arrays.test.ts: Use @socketsecurity/lib/arrays - ipc.test.ts: Use @socketsecurity/lib/ipc - objects.test.ts: Use @socketsecurity/lib/objects - promises.test.ts: Use @socketsecurity/lib/promises - spinner.test.ts: Use @socketsecurity/lib/spinner - strings.test.ts: Use @socketsecurity/lib/strings - src/ipc.ts: Import zod directly instead of from external wrapper Note: ipc.test.ts still has a zod import issue to be resolved separately.
1 parent 525a537 commit 4da6ffe

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

src/ipc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { promises as fs } from 'node:fs'
3333
import os from 'node:os'
3434
import path from 'node:path'
3535

36-
import { z } from './external/zod'
36+
import { z } from 'zod'
3737

3838
// Define BufferEncoding type for TypeScript compatibility.
3939
type BufferEncoding = globalThis.BufferEncoding

test/registry/arrays.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
isArray,
1010
joinAnd,
1111
joinOr,
12-
} from '../../../src/lib/arrays'
12+
} from '@socketsecurity/lib/arrays'
1313

1414
describe('arrays', () => {
1515
describe('arrayChunk', () => {

test/registry/ipc.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
parseIpcMessage,
1717
readIpcStub,
1818
writeIpcStub,
19-
} from '../../../src/lib/ipc'
19+
} from '@socketsecurity/lib/ipc'
2020
import { runWithTempDir } from '../../utils/temp-file-helper.mts'
2121

2222
describe('ipc', () => {

test/registry/objects.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
objectFreeze,
2222
toSortedObject,
2323
toSortedObjectFromEntries,
24-
} from '../../../src/lib/objects'
24+
} from '@socketsecurity/lib/objects'
2525

2626
describe('objects', () => {
2727
describe('createLazyGetter', () => {

test/registry/promises.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
pFilter,
1111
pRetry,
1212
resolveRetryOptions,
13-
} from '../../../src/lib/promises'
13+
} from '@socketsecurity/lib/promises'
1414

1515
describe('promises', () => {
1616
describe('resolveRetryOptions', () => {

test/registry/spinner.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { beforeEach, describe, expect, it } from 'vitest'
2-
import type { Spinner as SpinnerType } from '../../../src/lib/spinner'
3-
import { Spinner } from '../../../src/lib/spinner'
2+
import type { Spinner as SpinnerType } from '@socketsecurity/lib/spinner'
3+
import { Spinner } from '@socketsecurity/lib/spinner'
44

55
describe('Spinner', () => {
66
let spinner: SpinnerType

test/registry/strings.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
stripBom,
1919
toKebabCase,
2020
trimNewlines,
21-
} from '../../../src/lib/strings'
21+
} from '@socketsecurity/lib/strings'
2222

2323
describe('strings', () => {
2424
describe('ansiRegex', () => {

0 commit comments

Comments
 (0)