import { describe, expect, test } from "bun:test";

import { readRuntimeConfig } from "../../src/server/config";

describe("runtime config", () => {
  test("返回配置文件路径", () => {
    expect(readRuntimeConfig(["./probes.yaml"])).toEqual({ configPath: "./probes.yaml" });
  });

  test("未提供参数抛出错误", () => {
    expect(() => readRuntimeConfig([])).toThrow("需要指定 YAML 配置文件路径");
  });
});
