import assert from "node:assert/strict"
import { describe, it } from "node:test"
import {
  normalizeBulletStyleId,
  normalizeOrderedStyleId,
  orderedPresetById,
} from "./docs-list-styles.ts"

describe("docs-list-styles", () => {
  it("normalizes bullet style ids", () => {
    assert.equal(normalizeBulletStyleId("arrow"), "arrow")
    assert.equal(normalizeBulletStyleId("invalid"), "disc")
  })

  it("normalizes ordered style ids", () => {
    assert.equal(normalizeOrderedStyleId("upper-roman"), "upper-roman")
    assert.equal(normalizeOrderedStyleId(undefined), "decimal")
  })

  it("maps ordered preset ol types", () => {
    assert.equal(orderedPresetById("upper-alpha").olType, "A")
    assert.equal(orderedPresetById("decimal").olType, null)
  })
})
