Files
AFFiNE/blocksuite/framework/std/src/__tests__/test-spec.ts
doouding d7268ce04c test: add std gfx test (#11442)
### Changed
- Move some intergraion tests to std as they are more like basic tests
- Add some basic gfx-related tests
2025-04-08 16:20:36 +00:00

28 lines
773 B
TypeScript

import './test-block.js';
import type { ExtensionType } from '@blocksuite/store';
import { literal } from 'lit/static-html.js';
import { BlockViewExtension } from '../extension/index.js';
import type { HeadingBlockModel } from './test-schema.js';
export const testSpecs: ExtensionType[] = [
BlockViewExtension('test:page', literal`test-root-block`),
BlockViewExtension('test:note', literal`test-note-block`),
BlockViewExtension('test:heading', model => {
const h = (model as HeadingBlockModel).props.type$.value;
if (h === 'h1') {
return literal`test-h1-block`;
}
return literal`test-h2-block`;
}),
BlockViewExtension('test:surface', literal`test-surface-block`),
BlockViewExtension('test:gfx-block', literal`test-gfx-block`),
];