openpencil/tests/engine/scene-graph/basic/text-picture-keys.test.ts
Danila Poyarkov 5e7c042352 test(scene-graph): split basic coverage
- Move scene graph behavior tests into focused files
- Share basic scene graph helper builders from basic/helpers.ts
- Remove scene graph basic from max-lines exceptions
2026-05-06 14:05:58 +03:00

37 lines
872 B
TypeScript

import { describe, expect, test } from 'bun:test'
import { SceneGraph } from '@open-pencil/core'
describe('TEXT_PICTURE_KEYS membership', () => {
test('contains text rendering properties', () => {
const keys = SceneGraph.TEXT_PICTURE_KEYS
for (const k of [
'text',
'fontSize',
'fontFamily',
'fontWeight',
'italic',
'textAlignHorizontal',
'textDirection',
'textAlignVertical',
'lineHeight',
'letterSpacing',
'textDecoration',
'textCase',
'styleRuns',
'fills',
'width',
'height'
]) {
expect(keys.has(k)).toBe(true)
}
})
test('does NOT contain non-text properties', () => {
const keys = SceneGraph.TEXT_PICTURE_KEYS
for (const k of ['x', 'y', 'rotation', 'opacity', 'visible', 'name']) {
expect(keys.has(k)).toBe(false)
}
})
})