openpencil/tests/engine/figma/api/corner-radius.test.ts
Danila Poyarkov 9ebc61d78f test(figma): split API coverage
- Move FigmaAPI tests into focused files by feature area
- Share API construction from figma/api/helpers.ts
- Remove FigmaAPI coverage from max-lines exceptions
2026-05-06 13:37:15 +03:00

23 lines
614 B
TypeScript

import { describe, expect, test } from 'bun:test'
import { createAPI } from './helpers'
describe('corner radius', () => {
test('uniform corner radius', () => {
const api = createAPI()
const rect = api.createRectangle()
rect.cornerRadius = 8
expect(rect.cornerRadius).toBe(8)
expect(rect.topLeftRadius).toBe(8)
expect(rect.bottomRightRadius).toBe(8)
})
test('independent corners return mixed', () => {
const api = createAPI()
const rect = api.createRectangle()
rect.topLeftRadius = 4
rect.bottomRightRadius = 12
expect(rect.cornerRadius).toBe(api.mixed)
})
})