Remove unnecessary comments

This commit is contained in:
Oleg Ivaniv 2024-12-10 08:57:39 +01:00
parent 2e105d147f
commit 0fae057871
No known key found for this signature in database
2 changed files with 0 additions and 7 deletions

View file

@ -70,10 +70,6 @@ describe('MetricsInput', () => {
// Each metric row has a delete button, identified by "button"
const deleteButtons = getAllByRole('button', { name: '' });
// Since these are icon buttons, if you have trouble querying by role/name,
// consider adding a test-id or using `getAllByTestId('evaluation-metric-item')`
// and navigate to its sibling button.
expect(deleteButtons).toHaveLength(props.modelValue.length);
// Click on the delete button for the second metric
@ -132,11 +128,9 @@ describe('MetricsInput', () => {
const deleteButtons = getAllByRole('button', { name: '' });
await userEvent.click(deleteButtons[0]);
// Verify the "deleteMetric" event
expect(emitted('deleteMetric')).toBeTruthy();
expect(emitted('deleteMetric')[0]).toEqual([{ name: 'Metric 1' }]);
// Re-render with the updated props (simulating parent update)
await rerender({ modelValue: [{ name: 'Metric 2' }] });
const updatedInputs = getAllByPlaceholderText('Enter metric name');
expect(updatedInputs).toHaveLength(1);

View file

@ -96,7 +96,6 @@ describe('useTestDefinitionForm', () => {
it('should handle errors while loading test data', async () => {
const { loadTestData } = useTestDefinitionForm();
// const fetchSpy = vi.fn().mockRejectedValue(new Error('Fetch Failed'));
const fetchSpy = vi
.spyOn(useTestDefinitionStore(), 'fetchAll')
.mockRejectedValue(new Error('Fetch Failed'));