import assert from "node:assert/strict"
import { describe, it } from "node:test"
import { pageSetupDraftsEqual, systemPageSetupDraft } from "./docs-page-defaults.ts"

describe("docs-page-defaults", () => {
  it("compares page setup drafts", () => {
    const base = systemPageSetupDraft("a4")
    assert.ok(pageSetupDraftsEqual(base, { ...base }))
    assert.ok(
      !pageSetupDraftsEqual(base, {
        ...base,
        marginsCm: { ...base.marginsCm, top: base.marginsCm.top + 0.1 },
      })
    )
  })
})
