openpencil/tests/engine/figma/api/text/extras.test.ts
Danila Poyarkov aad26b535e test: move prefixed splits into domain folders
- Move newly split tests under explicit domain subfolders
- Update nested helper imports after the moves
- Add a lint guard against repeating existing sibling domains as filename prefixes
2026-05-06 14:27:21 +03:00

38 lines
1 KiB
TypeScript

import { describe, expect, test } from 'bun:test'
import { createAPI } from '../helpers'
describe('text extras', () => {
test('textTruncation', () => {
const api = createAPI()
const text = api.createText()
expect(text.textTruncation).toBe('DISABLED')
text.textTruncation = 'ENDING'
expect(text.textTruncation).toBe('ENDING')
})
test('autoRename', () => {
const api = createAPI()
const text = api.createText()
expect(text.autoRename).toBe(true)
text.autoRename = false
expect(text.autoRename).toBe(false)
})
test('insertCharacters', () => {
const api = createAPI()
const text = api.createText()
text.characters = 'Hello World'
text.insertCharacters(5, ' Beautiful')
expect(text.characters).toBe('Hello Beautiful World')
})
test('deleteCharacters', () => {
const api = createAPI()
const text = api.createText()
text.characters = 'Hello Beautiful World'
text.deleteCharacters(5, 15)
expect(text.characters).toBe('Hello World')
})
})