import {createElementFromHTML} from '../../utils/dom.ts'; import {hideScopedEmptyDividers} from './dropdown.ts'; test('hideScopedEmptyDividers-simple', () => { const container = createElementFromHTML(`
a
b
`); hideScopedEmptyDividers(container); expect(container.innerHTML).toEqual(`
a
b
`); }); test('hideScopedEmptyDividers-items-all-filtered', () => { const container = createElementFromHTML(`
a
b
`); hideScopedEmptyDividers(container); expect(container.innerHTML).toEqual(`
a
b
`); }); test('hideScopedEmptyDividers-hide-last', () => { const container = createElementFromHTML(`
a
b
`); hideScopedEmptyDividers(container); expect(container.innerHTML).toEqual(`
a
b
`); }); test('hideScopedEmptyDividers-scoped-items', () => { const container = createElementFromHTML(`
a
b
c
`); hideScopedEmptyDividers(container); expect(container.innerHTML).toEqual(`
a
b
c
`); });