schlechtenburg/packages/rich-text/lib/test/is-empty.test.ts
2024-10-08 09:15:26 +02:00

23 lines
393 B
TypeScript

import { describe, expect, it } from 'vitest'
import { isEmpty } from '../is-empty';
describe( 'isEmpty', () => {
it( 'should return true', () => {
const one = {
formats: [],
text: '',
};
expect( isEmpty( one ) ).toBe( true );
} );
it( 'should return false', () => {
const one = {
formats: [],
text: 'test',
};
expect( isEmpty( one ) ).toBe( false );
} );
} );