Skip to content

Commit

Permalink
Sonar: Fix - refactor this code to not nest functions more than 4 lev…
Browse files Browse the repository at this point in the history
…els deep
  • Loading branch information
qmonmert committed Nov 8, 2024
1 parent f47a7c5 commit 15c30a2
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1246,14 +1246,14 @@ describe('Landscape', () => {
await performSearch(searchInput, 'not-found');

const landscape = defaultLandscape();
landscape.standaloneLevels().forEach(level => {
level.elements.forEach(element => {
element.allModules().forEach(module => {
const moduleClasses = wrapper.find(wrappedElement(`${module.slugString()}-module`)).classes();
expect(moduleClasses).not.toContain('-search-highlighted');
});
landscape
.standaloneLevels()
.flatMap(level => level.elements)
.flatMap(element => element.allModules())
.forEach(module => {
const moduleClasses = wrapper.find(wrappedElement(`${module.slugString()}-module`)).classes();
expect(moduleClasses).not.toContain('-search-highlighted');
});
});
});

it('should scroll vertically and horizontally to the highlighted module if it is not visible within the current viewport', async () => {
Expand Down

0 comments on commit 15c30a2

Please sign in to comment.