schlechtenburg/packages/rich-text/lib/test/is-empty.test.ts

23 lines
393 B
TypeScript
Raw Normal View History

2024-10-08 07:15:26 +00:00
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 );
} );
} );