import { describe, expect, it } from 'vitest'
import { readRuntimeVersion } from '../src/dimsdk/core/version-env.ts'

describe('version env', () => {
  it('reads the runtime version from DIMCODE_VERSION', () => {
    expect(readRuntimeVersion({ DIMCODE_VERSION: ' 1.2.3 ' })).toBe('1.2.3')
  })

  it('ignores removed VUE_TERMINAL_VERSION fallback', () => {
    expect(readRuntimeVersion({ VUE_TERMINAL_VERSION: '9.9.9' })).toBe('')
  })
})
