import { describe, expect, it } from 'vitest'

import { loadConfig } from './config.js'

describe('loadConfig', () => {
  it('throws when a required binding is missing', () => {
    expect(() =>
      loadConfig({
        AUTH_PEPPER: 'pepper',
        DATABASE_URL: 'postgres://postgres:postgres@127.0.0.1:5432/press_zone',
      }),
    ).toThrow('Missing required binding: AUTH_SESSION_SECRET')
  })
})
