schlechtenburg/packages/standalone/__tests__/standalone.test.ts

18 lines
555 B
TypeScript

import { describe, expect, it } from 'vitest'
import { startSchlechtenburg, SbMode } from '../lib';
import exampleData from '../../../docs/example-data';
describe('@schlechtenburg/standalone', () => {
it('edit should render', async () => {
const wrapper = document.createElement('div');
const sb = await startSchlechtenburg(wrapper, {
availableBlocks: [],
block: exampleData,
eventUpdate: () => {},
mode: SbMode.View,
});
expect(sb.getMode()).toBe(SbMode.View);
expect(sb.getBlock()).toBeTruthy();
});
});