Skip to content

Commit d751bf1

Browse files
committed
fix(protect): use public API imports in tests
Import inferIndexType and validateIndexType from public API (src/index) instead of internal helper module. Use type inference from protect() return type instead of importing ProtectClient from internal ffi module.
1 parent 6162405 commit d751bf1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/protect/__tests__/encrypt-query-stevec.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import 'dotenv/config'
22
import { describe, expect, it, beforeAll } from 'vitest'
33
import { protect } from '../src'
4-
import type { ProtectClient } from '../src/ffi'
4+
5+
type ProtectClient = Awaited<ReturnType<typeof protect>>
56
import {
67
jsonbSchema,
78
metadata,

packages/protect/__tests__/infer-index-type.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { describe, expect, it } from 'vitest'
22
import { csColumn, csTable } from '@cipherstash/schema'
3+
import { inferIndexType, validateIndexType } from '../src/index'
34
import {
4-
inferIndexType,
5-
validateIndexType,
65
inferQueryOpFromPlaintext,
76
resolveIndexType,
87
} from '../src/ffi/helpers/infer-index-type'

0 commit comments

Comments
 (0)