- Move FigmaAPI tests into focused files by feature area - Share API construction from figma/api/helpers.ts - Remove FigmaAPI coverage from max-lines exceptions
22 lines
558 B
TypeScript
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')
|
|
})
|
|
})
|