Files
open-multi-agent/packages/otel/tests/version-sync.test.ts
Jack Chen 9338bb4dec chore(observability): complete OBS-5 release readiness (#385)
* chore(observability): complete OBS-5 release readiness

* docs(observability): add v2 architecture to core readme
2026-07-16 18:00:16 +08:00

21 lines
933 B
TypeScript

import { readFileSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { PACKAGE_VERSION } from '../src/version.js'
describe('package version constant', () => {
it('matches package.json so the default instrumentationVersion cannot drift on release', () => {
const manifestPath = fileURLToPath(new URL('../package.json', import.meta.url))
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8')) as { version: string }
expect(PACKAGE_VERSION).toBe(manifest.version)
})
it('requires the first core release that actually contains Observability v2', () => {
const manifestPath = fileURLToPath(new URL('../package.json', import.meta.url))
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8')) as {
dependencies: Record<string, string>
}
expect(manifest.dependencies['@open-multi-agent/core']).toBe('^1.11.0')
})
})