Skip to content

Commit

Permalink
Create Left Sidebar layout (#672)
Browse files Browse the repository at this point in the history
* Create Left Sidebar layout

* Setup Jest on the project

* Create SideBar test

* Fix DarkModeSwitch color contrast

* Add ScreenReaderOnly Text to expand/collapse button

* Create SkipNavigation anchor

* Remove unnecessary button from AuthorizedPage
  • Loading branch information
negreirosleo authored Sep 20, 2023
1 parent d1bfa0a commit 9498e08
Show file tree
Hide file tree
Showing 21 changed files with 11,291 additions and 2,948 deletions.
13 changes: 13 additions & 0 deletions frontend/jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import nextJest from 'next/jest.js'

const createJestConfig = nextJest({
dir: './',
})

const config = {
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
setupFilesAfterEnv: ['./jest.setup.ts'],
}

export default createJestConfig(config)
15 changes: 15 additions & 0 deletions frontend/jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import '@testing-library/jest-dom'

Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation(query => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(), // deprecated
removeListener: jest.fn(), // deprecated
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
});
Loading

0 comments on commit 9498e08

Please sign in to comment.