Files
pdfme/packages/cli/__tests__/schema-plugins.test.ts
Kyohei Fukuda bed77e5713 [codex] add list schema implementation plan (#1460)
* docs: add list schema implementation plan

* feat(schemas): add list schema

* fix(schemas): improve list form editing

* fix(schemas): localize list editing labels

* fix(schemas): align table control buttons

* fix(schemas): keep list designer editing during actions

* fix(tsconfig): resolve list schema subpath

* fix(schemas): keep list action clicks isolated

* fix(schemas): support empty list state

* fix(schemas): allow editing list items in designer

* fix(schemas): keep list designer editing on enter

* fix(schemas): ignore IME enter in list editor

* fix(schemas): make enter insert list item line breaks

* test(generator): add list plugin to playground snapshots

* refactor(schemas): render list items with text ui

* fix(schemas): adapt list prop panel fields by style

* fix(schemas): simplify list options and nested numbering

* Reorder import statements in generate-templates-thumbnail

* Reorder List plugin in getPlugins function

* fix(ui): reflow schemas after dynamic list resize

* chore: remove obsolete list plan

* fix(ui): reflow form list height changes

* fix(ui): keep designer height changes local

* fix(schemas): commit list item line breaks immediately

* fix(schemas): restore list focus after line break rerender

* fix(schemas): keep form list focused after enter

* test(generator): update dynamic list snapshots

* fix(schemas): store list content as json arrays

* fix(schemas): address list review cleanup

* test(ui): update designer snapshot

* chore: trim list pr noise

* fix(schemas): align list markers in ui
2026-05-03 13:34:51 +09:00

30 lines
842 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',
'list',
'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);
});
});