Files
pdfme/packages/cli/__tests__/schema-plugins.test.ts
2026-03-24 16:01:49 +09:00

29 lines
826 B
TypeScript

import { describe, expect, it } from 'vitest';
import { schemaPlugins, schemaTypes } from '../src/schema-plugins.js';
describe('schema plugin discovery', () => {
it('collects exported schema plugins by schema type', () => {
expect(Object.keys(schemaPlugins)).toEqual(
expect.arrayContaining([
'text',
'multiVariableText',
'image',
'signature',
'table',
'qrcode',
'ean13',
'code128',
'radioGroup',
'checkbox',
]),
);
});
it('does not leak export container names or aliases into known types', () => {
expect(schemaTypes.has('barcodes')).toBe(false);
expect(schemaTypes.has('builtInPlugins')).toBe(false);
expect(schemaTypes.has('Text')).toBe(false);
expect(schemaTypes.has('text')).toBe(true);
});
});