Skip to content

Commit

Permalink
Fix Linter Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidazim321 committed Aug 1, 2023
1 parent 2acd8ba commit a743e2d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/Modules/__tests__/counter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ describe('Comments Counter', () => {
});

describe('Meals Counter', () => {

test('Update Header to have the correct Count of Items', () => {

document.body.innerHTML = `
<nav id="Navbar">
<div id="brand">
Expand All @@ -102,23 +100,23 @@ describe('Meals Counter', () => {
// Parameters for the commentsCounter Function
const arr = [
{
obj: 'obj1'
obj: 'obj1',
},
{
obj: 'obj2'
obj: 'obj2',
},
{
obj: 'obj3'
}
]
obj: 'obj3',
},
];

const nav = document.querySelector('#nav-dishes');

// call the comments Counter Function to count the items in the array and update the header

mealCounter(arr)
mealCounter(arr);

// Check if the header textContent is updated correctly
expect(nav.textContent).toBe('Dishes (3)');
});
})
});

0 comments on commit a743e2d

Please sign in to comment.