Files
wallet/apps/extension/config/getTsconfigAliases.test.ts
T
Hanzo AI 78b18797d5 init: extract wallet from lux/exchange monorepo
Copies apps/extension, apps/mobile and 10 pkgs (wallet, ui, config,
utilities, sessions, gating, notifications, analytics, eslint-config,
prices) into a standalone pnpm workspace.  Resolves merge conflict
markers in extension and mobile package.json files, strips build
artifacts (.wxt, .output, Pods).
2026-04-11 01:59:19 -07:00

26 lines
1.0 KiB
TypeScript

/* oxlint-disable universe-custom/no-relative-import-paths */
import path from 'path'
import { getTsconfigAliases } from './getTsconfigAliases'
describe('getTsconfigAliases', () => {
it('should throw error when tsconfig file does not exist', () => {
const nonExistentPath = '/path/that/does/not/exist/tsconfig.json'
expect(() => getTsconfigAliases(nonExistentPath)).toThrow(`tsconfig file not found at: ${nonExistentPath}`)
})
it('should successfully parse the real tsconfig.base.json', () => {
const result = getTsconfigAliases()
// Verify we got aliases for some known packages
expect(result).toHaveProperty('uniswap')
expect(result).toHaveProperty('@universe/api')
// Verify paths are absolute and point to the packages directory
expect(result['uniswap']).toContain('packages/uniswap')
expect(result['@universe/api']).toContain('packages/api')
expect(path.isAbsolute(result['uniswap']!)).toBe(true)
expect(path.isAbsolute(result['@universe/api']!)).toBe(true)
})
})