Files
ui/pkg/appearance/vitest.config.ts
zeekayandHanzo Dev 8301fc0e4c appearance: an org has a look, and a person has a reading
There was one preference and one key, so an org could not dress itself and a
person working across several orgs could not say whether "larger text" meant
here or everywhere. Four layers now, narrowest first: install, org, person
everywhere, person here.

Resolved per AXIS, not per layer. Picking a whole winning layer would drop an
org's accent the moment someone nudged their type size — the setting would read
as broken rather than as precedence working.

The install and org layers are arguments, not fetches: an org's branding is a
row on a server, and this module has to stay synchronous enough to run before
first paint. The boot script bakes them in for the same reason.

Adds the ratio axis from @hanzo/design 0.5.9, and a first test for the panel
itself — the wiring, where scoping can be right in principle and wrong on
screen. Both new guards were watched failing on the bug they name.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-16 11:20:42 -07:00

20 lines
812 B
TypeScript

import { defineConfig } from 'vitest/config'
/**
* jsdom, because this package's whole job is the two things a pure function
* cannot do: touch storage and touch the document. @hanzo/design already tests
* the transform in plain node; what is left here is exactly the part that needs
* a DOM to be true.
*/
export default defineConfig({
test: {
environment: 'jsdom',
include: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
// A real origin, because storage is scoped to one. jsdom defaults to
// about:blank, which is an OPAQUE origin and therefore has no localStorage
// at all — so the module whose job is storage had no storage to test
// against, and the suite quietly covered only the parts that fake it.
environmentOptions: { jsdom: { url: 'https://hanzo.ai' } },
},
})