import { describe, expect, it } from 'vitest';
import { removeSelectedItem } from './selection';
describe('compare item selection', () => {
it('allows the final selected item to be removed', () => {
expect(removeSelectedItem(['phone'], 'phone')).toEqual([]);
});
it('removes only the requested item', () => {
expect(
removeSelectedItem(['phone', 'tablet', 'banana'], 'tablet')
).toEqual(['phone', 'banana']);
});
});
Browse the implementation files for TVs Comparison.