Files
iti-technology/apps/api/test/columns.test.ts
T
Lorenzo SanesiandClaude Opus 5.5 b83ce039fb
Deploy stack su Proxmox / deploy (push) Failing after 3s
Piattaforma ITI TECHNOLOGY: monorepo, Medusa, API, sito, area riservata e deploy
Monorepo npm con apps/public (Angular SSR), apps/private (Angular SPA),
apps/api (Fastify), packages/shared e packages/styles; Medusa 2.21 in medusa/;
infrastruttura Docker (Postgres PostGIS+pgvector, Redis, Caddy, backup) e
workflow Gitea Actions per il deploy via SSH a ogni push su master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018jQyT6dR9czzGwqb7FkG6u
2026-10-20 09:30:48 +02:00

16 lines
690 B
TypeScript

import { describe, expect, it } from "vitest"
import { parseEwkbPoint } from "../src/db/schema/columns.js"
describe("parseEwkbPoint", () => {
it("EWKB little-endian con SRID (formato restituito da Postgres)", () => {
expect(parseEwkbPoint("0101000020E6100000E17A14AE47612240CF66D5E76ABB4640")).toEqual({ lng: 9.19, lat: 45.4642 })
})
it("EWKB big-endian con SRID", () => {
expect(parseEwkbPoint("0020000001000010e6c05280624dd2f1aa40445b3d07c84b5e")).toEqual({ lng: -74.006, lat: 40.7128 })
})
it("rifiuta tipi diversi da Point", () => {
// LineString (tipo 2), little-endian, senza SRID
expect(() => parseEwkbPoint("010200000000000000")).toThrow(/Point/)
})
})