openpencil/tests/engine/figma/api/mask.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

22 lines
558 B
TypeScript

import { describe, expect, test } from 'bun:test'
import { createAPI } from './helpers'
describe('mask', () => {
test('isMask defaults to false', () => {
const api = createAPI()
const rect = api.createRectangle()
expect(rect.isMask).toBe(false)
expect(rect.maskType).toBe('ALPHA')
})
test('can set mask properties', () => {
const api = createAPI()
const rect = api.createRectangle()
rect.isMask = true
rect.maskType = 'LUMINANCE'
expect(rect.isMask).toBe(true)
expect(rect.maskType).toBe('LUMINANCE')
})
})