- 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
37 lines
872 B
TypeScript
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)
|
|
}
|
|
})
|
|
})
|