Skip to content

Commit

Permalink
Merge pull request #299 from SchoodEIP/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Exiels authored Dec 6, 2024
2 parents c680381 + 509c68a commit 9c1ddbd
Show file tree
Hide file tree
Showing 24 changed files with 307 additions and 229 deletions.
9 changes: 8 additions & 1 deletion src/Components/Accounts/Adm/admAccountsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import deleteButton from '../../../assets/deleteIcon.png'
import suspendButton from '../../../assets/suspendIcon.png'
import restoreButton from '../../../assets/restoreIcon.png'

export default function AdmAccountsTable () {
export default function AdmAccountsTable ({ handleUpdateContent, isUpdated }) {
const [accountList, setAccountList] = useState([]) // list of accounts

Check warning on line 13 in src/Components/Accounts/Adm/admAccountsTable.js

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
const [isPopupOpen, setIsPopupOpen] = useState(false)

Check warning on line 14 in src/Components/Accounts/Adm/admAccountsTable.js

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
const [userId, setUserId] = useState('')

Check warning on line 15 in src/Components/Accounts/Adm/admAccountsTable.js

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
Expand All @@ -35,6 +35,13 @@ export default function AdmAccountsTable () {
}

Check warning on line 35 in src/Components/Accounts/Adm/admAccountsTable.js

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

useEffect(() => {
if (isUpdated) {
getAccountList()
handleUpdateContent()
}
}, [isUpdated])

async function getSuspendedAccountList (list) {
const baseUrl = process.env.REACT_APP_BACKEND_URL + '/user/getDisabled'
const token = sessionStorage.getItem('token')
Expand Down
34 changes: 24 additions & 10 deletions src/Components/Accounts/SchoolAdm/schoolAccountsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import suspendButton from '../../../assets/suspendIcon.png'
import restoreButton from '../../../assets/restoreIcon.png'
import Select from 'react-select'

export default function SchoolAccountsTable ({ status }) {
export default function SchoolAccountsTable ({ isUpdated, handleUpdateContent, status }) {
const [teacherList, setTeacherList] = useState([])
const [studentList, setStudentList] = useState([])
const [selectedUser, setSelectedUser] = useState(null)
Expand Down Expand Up @@ -47,12 +47,15 @@ export default function SchoolAccountsTable ({ status }) {
disconnect()
} else {
const data = await resp.json()
const array = [...accounts, ...data]

const teacherAccounts = array.filter(account => account.role.name === 'teacher')
const studentAccounts = array.filter(account => account.role.name === 'student')
setTeacherList(teacherAccounts)
setStudentList(studentAccounts)
if (data.message !== 'Access Forbidden') {
const array = [...accounts, ...data]

const teacherAccounts = array.filter(account => account.role.name === 'teacher')
const studentAccounts = array.filter(account => account.role.name === 'student')
setTeacherList(teacherAccounts)
setStudentList(studentAccounts)
}
}
}

Expand Down Expand Up @@ -100,6 +103,13 @@ export default function SchoolAccountsTable ({ status }) {
})
}

useEffect(() => {
if (isUpdated) {
getAccountList()
handleUpdateContent()
}
}, [isUpdated])

const showClasses = (classes) => {
if (!Array.isArray(classes)) {
return ''
Expand Down Expand Up @@ -195,7 +205,11 @@ export default function SchoolAccountsTable ({ status }) {

studentClass.map(classe => { return callAction(classe, '/updateStudent') })
}
if (!classError) { toast.success('Le profil a été mis à jour avec succès.') }
if (!classError) {
toast.success('Le profil a été mis à jour avec succès.')
handleUpdateContent()
openEditing()
}
}

const handleUpdate = async (e) => {
Expand Down Expand Up @@ -315,7 +329,7 @@ export default function SchoolAccountsTable ({ status }) {
<div className='popup-modal-container' style={{ alignItems: 'center' }}>
<button className='close-btn' onClick={close}><img src={cross} alt='Close' /></button>
<div className='editProfileForm'>
<h2>Modifier Profil</h2>
<h2>Modifier le profil</h2>
<form className='form-profile-modif' onSubmit={handleUpdate}>
<div>
<label className='input-label' htmlFor='firstname'>Prénom:
Expand Down Expand Up @@ -407,7 +421,7 @@ export default function SchoolAccountsTable ({ status }) {
<td title={`${data.firstname} ${data.lastname}`}>{data.lastname}</td>
<td title={`${data.email}`}>{data.email}</td>
<td>{showClasses(data.classes)}</td>
{status && <td><button style={{ fontFamily: 'Inter' }} onClick={(e) => { e.stopPropagation(); handleEditClick(data) }} title='Modifier le profil'>Modifier</button></td>}
{status && <td>{data.active && <button style={{ fontFamily: 'Inter' }} onClick={(e) => { e.stopPropagation(); handleEditClick(data) }} title='Modifier le profil'>Modifier</button>}</td>}
{status &&
<td>
{
Expand Down Expand Up @@ -451,7 +465,7 @@ export default function SchoolAccountsTable ({ status }) {
<td title={`${data.firstname} ${data.lastname}`}>{data.lastname}</td>
<td title={`${data.email}`}>{data.email}</td>
<td>{showClasses(data.classes)}</td>
{status && <td><button style={{ fontFamily: 'Inter' }} onClick={(e) => { e.stopPropagation(); handleEditClick(data) }} title='Modifier le Profil'>Modifier</button></td>}
{status && <td>{data.active && <button style={{ fontFamily: 'Inter' }} onClick={(e) => { e.stopPropagation(); handleEditClick(data) }} title='Modifier le profil'>Modifier</button>}</td>}
{status &&
<td>
{
Expand Down
82 changes: 42 additions & 40 deletions src/Components/Aides/aides.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import phoneIcon from '../../assets/phoneIcon.png'
import mailIcon from '../../assets/mailIcon.png'
import { toast } from 'react-toastify'

export default function AidePage () {
export default function AidePage ({ updateContent, handleUpdateContent }) {
const [categories, setCategories] = useState([])
const [contacts, setContacts] = useState([])
const [chosenContact, setChosenContact] = useState([])
Expand All @@ -18,49 +18,51 @@ export default function AidePage () {
useEffect(() => {
const categoryUrl = process.env.REACT_APP_BACKEND_URL + '/user/helpNumbersCategories'
const helpNumbersUrl = process.env.REACT_APP_BACKEND_URL + '/user/helpNumbers'

fetch(categoryUrl, {
method: 'GET',
headers: {
'x-auth-token': sessionStorage.getItem('token'),
'Content-Type': 'application/json'
}
}).then(response => {
if (response.status === 401) {
disconnect()
}
return response.json()
})
.then(data => {
setCategories(data)
const filterID = data.filter((category) => category.name === 'Autres')
if (filterID.length !== 0) {
setDefaultID(filterID[0]._id)
setSelectedCat(filterID[0]._id)
if (updateContent) {
fetch(categoryUrl, {
method: 'GET',
headers: {
'x-auth-token': sessionStorage.getItem('token'),
'Content-Type': 'application/json'
}
}).then(response => {
if (response.status === 401) {
disconnect()
}
return response.json()
})
.catch(error => toast.error(error.message))
.then(data => {
setCategories(data)
const filterID = data.filter((category) => category.name === 'Autres')
if (filterID.length !== 0) {
setDefaultID(filterID[0]._id)
setSelectedCat(filterID[0]._id)
}
})
.catch(error => toast.error(error.message))

fetch(helpNumbersUrl, {
method: 'GET',
headers: {
'x-auth-token': sessionStorage.getItem('token'),
'Content-Type': 'application/json'
}
}).then(response => {
if (response.status === 401) {
disconnect()
}
return response.json()
})
.then(data => {
setContacts(data)
setFilteredContacts(data)
setChosenContact(data[0])
setSelectedContact(data[0]._id)
fetch(helpNumbersUrl, {
method: 'GET',
headers: {
'x-auth-token': sessionStorage.getItem('token'),
'Content-Type': 'application/json'
}
}).then(response => {
if (response.status === 401) {
disconnect()
}
return response.json()
})
.catch(error => toast.error('Erreur ' + error.status + ': ' + error.message))
}, [])
.then(data => {
setContacts(data)
setFilteredContacts(data)
setChosenContact(data[0])
setSelectedContact(data[0]._id)
})
.catch(error => toast.error('Erreur ' + error.status + ': ' + error.message))
handleUpdateContent()
}
}, [updateContent])

const filterContactsByCategory = (category) => {
const filtered = contacts.filter((contact) => category !== defaultID ? contact.helpNumbersCategory === category : contact)
Expand Down
27 changes: 8 additions & 19 deletions src/Components/ChatRoom/chatRoom.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import '../../css/Components/Popup/popup.scss'
import cross from '../../assets/Cross.png'
import { disconnect } from '../../functions/disconnect'
import UserProfile from '../../Components/userProfile/userProfile'
import { toast } from 'react-toastify'

const Messages = () => {
const [conversations, setConversations] = useState([])
const [currentConversation, setCurrentConversation] = useState('')
const [notification, setNotification] = useState({ visible: false, message: '', type: '' })
const { send, chats } = useContext(WebsocketContext) // eslint-disable-line
const inputFile = useRef(null)

Expand Down Expand Up @@ -143,13 +143,6 @@ const Messages = () => {
return () => clearInterval(intervalId)
}, [currentConversation])

const openNotification = (message, type) => {
setNotification({ visible: true, message, type })
setTimeout(() => {
setNotification({ visible: false, message: '', type: '' })
}, 3000) // La notification sera visible pendant 3 secondes
}

const sendMessage = async () => {
if (newMessage.trim() === '' && !file) {
return
Expand Down Expand Up @@ -291,10 +284,10 @@ const Messages = () => {
}

send('createChat', { ids: selectedContacts.filter((id) => id !== userId) })
openNotification('Une nouvelle conversation a été créée avec succès', 'success')
toast.success('Une nouvelle conversation a été créée avec succès')
fetchConversations()
} catch (error) /* istanbul ignore next */ {
openNotification('Erreur lors de la création de la conversation', 'error')
toast.error('Erreur lors de la création de la conversation')
setError('Erreur lors de la création de la conversation')
}
}
Expand Down Expand Up @@ -322,11 +315,11 @@ const Messages = () => {
throw new Error('Erreur lors de l\'ajout des participants.')
}

openNotification('Participants ajoutés avec succès', 'success')
toast.success('Participants ajoutés avec succès')
fetchConversations() // Met à jour les conversations
} catch (error) {
console.error('Erreur lors de l\'ajout des participants :', error)
openNotification('Erreur lors de l\'ajout des participants', 'error')
toast.error('Erreur lors de l\'ajout des participants')
} finally {
setShowAddParticipantsPopup(false) // Ferme la popup après l'ajout
}
Expand All @@ -351,12 +344,12 @@ const Messages = () => {
throw new Error('Erreur lors du départ de la conversation.')
}

openNotification('Vous avez quitté la conversation.', 'success')
toast.success('Vous avez quitté la conversation.')
setCurrentConversation('') // Réinitialiser la conversation actuelle
fetchConversations() // Mettre à jour la liste des conversations après avoir quitté
} catch (error) {
console.error('Erreur lors du départ de la conversation :', error)
openNotification('Erreur lors du départ de la conversation.', 'error')
toast.error('Erreur lors du départ de la conversation.')
} finally {
// clearNotification() // Efface la notification après un certain temps
setShowLeaveConversationPopup(false) // Ferme la popup après avoir quitté
Expand Down Expand Up @@ -404,10 +397,6 @@ const Messages = () => {
openCreateConversationPopup={openCreateConversationPopup}
/>
<div className='chat'>
{notification.visible &&
<div className={`notification ${notification.type}`}>
{notification.message}
</div>}
{currentConversation
? (
<div className='chat-content'>
Expand Down Expand Up @@ -492,7 +481,7 @@ const Messages = () => {
</div>
)
: (
<div>Aucune conversation sélectionnée.</div>
<div style={{ marginTop: '20px', marginLeft: '20px' }}>Aucune conversation sélectionnée.</div>
)}
</div>
<Popup open={showCreateConversationPopup} onClose={openCreateConversationPopup} modal contentStyle={{ width: '400px' }}>
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Popup/alertCreation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const AlertCreationPopupContent = () => {
}

return (
<>
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px', alignSelf: 'center' }}>
{
roleProfile === 'teacher'
? null
Expand Down Expand Up @@ -211,8 +211,8 @@ const AlertCreationPopupContent = () => {
<span className='label-content'>Fichier joint</span>
<input style={{ fontFamily: 'Inter' }} id='file-input' data-testid='alert-file-input' type='file' onChange={(e) => setFile(e.target.files[0])} />
</label>
<button className='popup-btn' onClick={handleAlertSubmit}>Créer l'Alerte</button>
</>
<button style={{ alignSelf: 'center' }} className='popup-btn' onClick={handleAlertSubmit}>Créer l'Alerte</button>
</div>
)
}

Expand Down
7 changes: 4 additions & 3 deletions src/Components/Popup/alertDeletion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import '../../css/pages/createAlerts.scss'

const AlertDeletionPopupContent = ({ onClose, chosenAlert, handleDeleteAlert }) => {
return (
<>
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px', alignSelf: 'center' }}>
<h3 style={{ alignSelf: 'center' }}>Supprimer l'alerte</h3>
<p>Êtes-vous certain(e) de vouloir supprimer cette alerte ?</p>
<p>Cette action sera irréversible.</p>
<button className='popup-btn' onClick={() => handleDeleteAlert(chosenAlert.id, onClose)}>Supprimer l'Alerte</button>
</>
<button style={{ alignSelf: 'center' }} className='popup-btn' onClick={() => handleDeleteAlert(chosenAlert.id, onClose)}>Supprimer l'Alerte</button>
</div>
)
}

Expand Down
10 changes: 6 additions & 4 deletions src/Components/Popup/alertModification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../css/pages/createAlerts.scss'
import { toast } from 'react-toastify'
import { disconnect } from '../../functions/disconnect'

const AlertModificationPopupContent = ({ onClose, chosenAlert, handleEditAlert }) => {
const AlertModificationPopupContent = ({ onClose, chosenAlert, handleEditAlert, handleUpdateContent }) => {
const [editedAlert, setEditedAlert] = useState(chosenAlert)
const [file, setFile] = useState(null)

Expand All @@ -31,6 +31,7 @@ const AlertModificationPopupContent = ({ onClose, chosenAlert, handleEditAlert }
if (response.status === 401) {
disconnect()
}
handleUpdateContent()
toast.success('Fichier envoyé avec l\'alerte avec succès')
})
.catch((error) => /* istanbul ignore next */ {
Expand All @@ -44,7 +45,8 @@ const AlertModificationPopupContent = ({ onClose, chosenAlert, handleEditAlert }
}

return (
<>
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px', alignSelf: 'center' }}>
<h3 style={{ alignSelf: 'center' }}>Modifier l'alerte</h3>
<label className='input-label'>
<span className='label-content'>Titre <span style={{ color: 'red' }}>*</span></span>
<input type='text' name='title' placeholder='Titre' value={editedAlert.title} onChange={handleEditChange} />
Expand All @@ -57,8 +59,8 @@ const AlertModificationPopupContent = ({ onClose, chosenAlert, handleEditAlert }
<span className='label-content'>Fichier joint</span>
<input id='file-input' data-testid='alert-file-input' type='file' onChange={(e) => setFile(e.target.files[0])} />
</label>
<button className='popup-btn' onClick={() => editAlert()}>Modifier l'Alerte</button>
</>
<button style={{ alignSelf: 'center' }} className='popup-btn' onClick={() => editAlert()}>Modifier l'Alerte</button>
</div>
)
}

Expand Down
Loading

1 comment on commit 9c1ddbd

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

Caution

Coverage does not meet threshold
Statements coverage not met for global: expected >=80%, but got 0.4721435316336166%

St.
Category Percentage Covered / Total
🔴 Statements 0.47% 15/3177
🔴 Branches 0.95% 14/1475
🔴 Functions 0.11% 1/915
🔴 Lines 0.03% 1/3049

Test suite run failed

Failed tests: 0/8. Failed suites: 48/49.
  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Popup/alertCreation.test.jsx'

      2 | import '@testing-library/jest-dom'
      3 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 4 | import { BrowserRouter } from 'react-router-dom'
        | ^
      5 | import AlertCreationPopupContent from '../../../Components/Popup/alertCreation'
      6 | import fetchMock from 'fetch-mock'
      7 | import { disconnect } from '../../../functions/disconnect'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Popup/alertCreation.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Users/Teacher/modifyFormTeacherPage.jsx'

    Require stack:
      src/Users/Teacher/modifyFormTeacherPage.jsx
      src/__tests__/Users/Teacher/modifyFormTeacherPage.test.jsx

      1 | import React, { useState, useEffect } from 'react'
    > 2 | import { useParams } from 'react-router-dom'
        | ^
      3 | import moment from 'moment'
      4 | import DatePicker from 'react-datepicker'
      5 | import HeaderComp from '../../Components/Header/headerComp'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Users/Teacher/modifyFormTeacherPage.jsx:2:1)
      at Object.require (src/__tests__/Users/Teacher/modifyFormTeacherPage.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Users/Shared/teacherProfilePage.test.jsx'

      3 | import '@testing-library/jest-dom'
      4 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 5 | import { MemoryRouter, Routes, Route } from 'react-router-dom'
        | ^
      6 | import fetchMock from 'fetch-mock'
      7 | import TeacherProfilePage from '../../../Users/Shared/TeacherProfilePage'
      8 | import { disconnect } from '../../../functions/disconnect'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Users/Shared/teacherProfilePage.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Teacher/newFormPage.jsx
      src/__tests__/Users/Teacher/newFormPage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Teacher/newFormPage.jsx:2:1)
      at Object.require (src/__tests__/Users/Teacher/newFormPage.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/ChatRoom/chatRoom.test.jsx'

       5 | import '@testing-library/jest-dom/'
       6 | import { WebsocketProvider } from '../../../contexts/websocket'
    >  7 | import { MemoryRouter } from 'react-router-dom'
         | ^
       8 | import { disconnect } from '../../../functions/disconnect'
       9 |
      10 | jest.mock('../../../functions/disconnect', () => ({

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/ChatRoom/chatRoom.test.jsx:7:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/SchoolAdmin/schoolAdmAccountsPage.js
      src/__tests__/Users/SchoolAdmin/schoolAdmAccountsPage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/SchoolAdmin/schoolAdmAccountsPage.js:2:1)
      at Object.require (src/__tests__/Users/SchoolAdmin/schoolAdmAccountsPage.test.jsx:3:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Admin/admAccountsPage.js
      src/__tests__/Users/Admin/admAccountsPage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Admin/admAccountsPage.js:2:1)
      at Object.require (src/__tests__/Users/Admin/admAccountsPage.test.jsx:3:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Accounts/SchoolAdm/schoolAdmAccountsTable.test.jsx'

      3 | import SchoolAccountsTable from '../../../../Components/Accounts/SchoolAdm/schoolAccountsTable'
      4 | import { WebsocketProvider } from '../../../../contexts/websocket'
    > 5 | import { BrowserRouter } from 'react-router-dom'
        | ^
      6 | import fetchMock from 'fetch-mock'
      7 | import { disconnect } from '../../../../functions/disconnect'
      8 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Accounts/SchoolAdm/schoolAdmAccountsTable.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Users/Shared/alertsPage.jsx'

    Require stack:
      src/Users/Shared/alertsPage.jsx
      src/__tests__/Users/Shared/alertsPage.test.jsx

      1 | import React, { useState, useEffect } from 'react'
    > 2 | import { useParams } from 'react-router-dom'
        | ^
      3 | import ShowAlerts from '../../Components/Alerts/showAlerts'
      4 | import HeaderComp from '../../Components/Header/headerComp'
      5 | import Popup from 'reactjs-popup'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Users/Shared/alertsPage.jsx:2:1)
      at Object.require (src/__tests__/Users/Shared/alertsPage.test.jsx:2:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/SchoolAdmin/reportChecking.jsx
      src/__tests__/Users/SchoolAdmin/reportChecking.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/SchoolAdmin/reportChecking.jsx:4:1)
      at Object.require (src/__tests__/Users/SchoolAdmin/reportChecking.test.jsx:1:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Users/Student/formStudentPage.jsx'

    Require stack:
      src/Users/Student/formStudentPage.jsx
      src/__tests__/Users/Student/formStudentPage.test.jsx

      1 | import React, { useEffect, useState } from 'react'
    > 2 | import { useNavigate, useParams } from 'react-router-dom'
        | ^
      3 | import { toast } from 'react-toastify'
      4 | import moment from 'moment'
      5 | import HeaderComp from '../../Components/Header/headerComp'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Users/Student/formStudentPage.jsx:2:1)
      at Object.require (src/__tests__/Users/Student/formStudentPage.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Shared/helpPage.jsx
      src/__tests__/Users/Shared/helpPage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Shared/helpPage.jsx:4:1)
      at Object.require (src/__tests__/Users/Shared/helpPage.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/ChatRoom/createConversationPopup.test.jsx'

       5 | import '@testing-library/jest-dom/'
       6 | import { WebsocketProvider } from '../../../contexts/websocket'
    >  7 | import { BrowserRouter } from 'react-router-dom'
         | ^
       8 |
       9 | describe('createConversationPopup Component', () => {
      10 |   const id = 123

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/ChatRoom/createConversationPopup.test.jsx:7:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Users/Teacher/formTeacherPage.jsx'

    Require stack:
      src/Users/Teacher/formTeacherPage.jsx
      src/__tests__/Users/Teacher/formTeacherPage.test.jsx

      1 | import React, { useState, useEffect } from 'react'
    > 2 | import { useParams } from 'react-router-dom'
        | ^
      3 | import moment from 'moment'
      4 | import HeaderComp from '../../Components/Header/headerComp'
      5 | import TeacherFormContent from '../../Components/Questionnaire/teacherFormContent'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Users/Teacher/formTeacherPage.jsx:2:1)
      at Object.require (src/__tests__/Users/Teacher/formTeacherPage.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Accounts/Adm/admAccountsTable.test.jsx'

      3 | import AdmAccountsTable from '../../../../Components/Accounts/Adm/admAccountsTable'
      4 | import { WebsocketProvider } from '../../../../contexts/websocket'
    > 5 | import { BrowserRouter } from 'react-router-dom'
        | ^
      6 | import fetchMock from 'fetch-mock'
      7 | import { disconnect } from '../../../../functions/disconnect'
      8 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Accounts/Adm/admAccountsTable.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Student/feelingsStudentPage.jsx
      src/__tests__/Users/Student/feelingStudentPage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Student/feelingsStudentPage.jsx:4:1)
      at Object.require (src/__tests__/Users/Student/feelingStudentPage.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Questionnaire/questSpace.jsx'

    Require stack:
      src/Components/Questionnaire/questSpace.jsx
      src/__tests__/Components/Questionnaire/questSpace.test.jsx

      1 | import React, { useEffect, useState } from 'react'
      2 | import '../../css/Components/Questionnaire/questSpace.scss'
    > 3 | import { Link, useNavigate } from 'react-router-dom'
        | ^
      4 | import rightArrowInverted from '../../assets/right-arrow-inverted.png'
      5 | import { disconnect } from '../../functions/disconnect'
      6 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Questionnaire/questSpace.jsx:3:1)
      at Object.require (src/__tests__/Components/Questionnaire/questSpace.test.jsx:2:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/ChatRoom/reportButton.test.jsx'

      4 | import ReportButton from '../../../Components/ChatRoom/reportButton'
      5 | import fetchMock from 'fetch-mock'
    > 6 | import { BrowserRouter } from 'react-router-dom'
        | ^
      7 | import { WebsocketProvider } from '../../../contexts/websocket'
      8 | import { disconnect } from '../../../functions/disconnect'
      9 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/ChatRoom/reportButton.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Sidebar/sidebar.test.jsx'

      1 | import React from 'react'
      2 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 3 | import { BrowserRouter } from 'react-router-dom'
        | ^
      4 | import Sidebar from '../../../Components/Sidebar/sidebar'
      5 | import { render, fireEvent, screen, act, waitFor } from '@testing-library/react'
      6 | import '@testing-library/jest-dom'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Sidebar/sidebar.test.jsx:3:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Profil/profileComp.test.jsx'

      4 | import fetchMock from 'fetch-mock'
      5 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 6 | import { MemoryRouter } from 'react-router-dom'
        | ^
      7 | import { disconnect } from '../../../functions/disconnect'
      8 | import ProfileComp from '../../../Components/Profil/profileComp'
      9 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Profil/profileComp.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Alerts/lastAlerts.test.jsx'

      3 | import { render, screen, act, waitFor } from '@testing-library/react'
      4 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 5 | import { BrowserRouter } from 'react-router-dom'
        | ^
      6 | import fetchMock from 'fetch-mock'
      7 | import { LastAlerts } from '../../../Components/Alerts/lastAlerts'
      8 | import { disconnect } from '../../../functions/disconnect'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Alerts/lastAlerts.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Users/Public/loginPage.test.jsx'

      3 | import Login from '../../../Users/Public/loginPage'
      4 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 5 | import { BrowserRouter } from 'react-router-dom'
        | ^
      6 | import fetchMock from 'fetch-mock'
      7 |
      8 | describe('Connexion', () => {

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Users/Public/loginPage.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Popup/reportCreation.test.jsx'

      2 | import '@testing-library/jest-dom'
      3 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 4 | import { BrowserRouter } from 'react-router-dom'
        | ^
      5 | import ReportCreationPopupContent from '../../../Components/Popup/reportCreation'
      6 | import fetchMock from 'fetch-mock'
      7 | import { disconnect } from '../../../functions/disconnect'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Popup/reportCreation.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/ChatRoom/chatRoomSidebar.test.jsx'

      4 | import '@testing-library/jest-dom/'
      5 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 6 | import { BrowserRouter } from 'react-router-dom'
        | ^
      7 |
      8 | describe('ChatRoomSidebar', () => {
      9 |   const conversations = [

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/ChatRoom/chatRoomSidebar.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Profil/profilPage.jsx'

    Require stack:
      src/Components/Profil/profilPage.jsx
      src/Users/Shared/profilPage.jsx
      src/__tests__/Users/Shared/profilPage.test.jsx

      1 | import React, { useEffect, useState } from 'react'
    > 2 | import { useNavigate } from 'react-router-dom'
        | ^
      3 | import '../../css/pages/profilPage.scss'
      4 | import userIcon from '../../assets/userIcon.png'
      5 | import Popup from 'reactjs-popup'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Profil/profilPage.jsx:2:1)
      at Object.require (src/Users/Shared/profilPage.jsx:2:1)
      at Object.require (src/__tests__/Users/Shared/profilPage.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/ChatRoom/message.test.jsx'

      4 | import '@testing-library/jest-dom/'
      5 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 6 | import { BrowserRouter } from 'react-router-dom'
        | ^
      7 | import { disconnect } from '../../../functions/disconnect'
      8 |
      9 | jest.mock('../../../functions/disconnect', () => ({

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/ChatRoom/message.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Popup/helpNumberCreation.test.jsx'

      2 | import '@testing-library/jest-dom'
      3 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 4 | import { BrowserRouter } from 'react-router-dom'
        | ^
      5 | import HelpNumberCreationPopupContent from '../../../Components/Popup/helpNumberCreation'
      6 | import fetchMock from 'fetch-mock'
      7 | import { disconnect } from '../../../functions/disconnect'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Popup/helpNumberCreation.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Teacher/statisticsTeacher.jsx
      src/__tests__/Users/Teacher/statisticsTeacher.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Teacher/statisticsTeacher.jsx:2:1)
      at Object.require (src/__tests__/Users/Teacher/statisticsTeacher.test.jsx:3:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Users/Public/forgottenPasswordPage.test.jsx'

      4 | import { render, act, fireEvent, waitFor, screen } from '@testing-library/react'
      5 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 6 | import { BrowserRouter } from 'react-router-dom'
        | ^
      7 |
      8 | describe('ForgottenPasswordPage', () => {
      9 |   beforeEach(() => {

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Users/Public/forgottenPasswordPage.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Popup/moodFormCreation.test.jsx'

      2 | import '@testing-library/jest-dom'
      3 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 4 | import { BrowserRouter } from 'react-router-dom'
        | ^
      5 | import MoodFormCreationPopupContent from '../../../Components/Popup/moodFormCreation'
      6 | import fetchMock from 'fetch-mock'
      7 | import { disconnect } from '../../../functions/disconnect'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Popup/moodFormCreation.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Profil/statComp.test.jsx'

      4 | import fetchMock from 'fetch-mock'
      5 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 6 | import { MemoryRouter } from 'react-router-dom'
        | ^
      7 | import { disconnect } from '../../../functions/disconnect'
      8 | import StatComp from '../../../Components/Profil/statComp'
      9 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Profil/statComp.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Teacher/formListTeacherPage.jsx
      src/__tests__/Users/Teacher/formListTeacherPage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Teacher/formListTeacherPage.jsx:2:1)
      at Object.require (src/__tests__/Users/Teacher/formListTeacherPage.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Student/formListStudentPage.jsx
      src/__tests__/Users/Student/formListStudentPage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Student/formListStudentPage.jsx:2:1)
      at Object.require (src/__tests__/Users/Student/formListStudentPage.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Users/Student/statisticsStudent.test.jsx'

      1 | import React from 'react'
      2 | import { render, screen, fireEvent, act, waitFor } from '@testing-library/react'
    > 3 | import { MemoryRouter } from 'react-router-dom'
        | ^
      4 | import StudentStatPage from '../../../Users/Student/statisticsStudent'
      5 | import fetchMock from 'fetch-mock'
      6 | import { disconnect } from '../../../functions/disconnect'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Users/Student/statisticsStudent.test.jsx:3:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Header/header.test.jsx'

      2 | import '@testing-library/jest-dom'
      3 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 4 | import { BrowserRouter } from 'react-router-dom'
        | ^
      5 | import HeaderComp from '../../../Components/Header/headerComp'
      6 | // import { disconnect } from '../../../functions/disconnect'
      7 | import fetchMock from 'fetch-mock'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Header/header.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Student/dashboardStudent.jsx
      src/__tests__/Users/Student/dashboardStudent.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Student/dashboardStudent.jsx:2:1)
      at Object.require (src/__tests__/Users/Student/dashboardStudent.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Shared/helpPage.jsx
      src/__tests__/Components/Aides/aides.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Shared/helpPage.jsx:4:1)
      at Object.require (src/__tests__/Components/Aides/aides.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Alerts/showAlert.test.jsx'

      3 | import { render, screen, act, waitFor } from '@testing-library/react'
      4 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 5 | import { BrowserRouter } from 'react-router-dom'
        | ^
      6 | import ShowAlerts from '../../../Components/Alerts/showAlerts'
      7 |
      8 | describe('ShowAlerts component', () => {

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Alerts/showAlert.test.jsx:5:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Profil/reportComp.test.jsx'

      4 | import fetchMock from 'fetch-mock'
      5 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 6 | import { MemoryRouter } from 'react-router-dom'
        | ^
      7 | import { disconnect } from '../../../functions/disconnect'
      8 | import ReportComp from '../../../Components/Profil/reportComp'
      9 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Profil/reportComp.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Profil/feelingsComp.test.jsx'

      4 | import fetchMock from 'fetch-mock'
      5 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 6 | import { MemoryRouter } from 'react-router-dom'
        | ^
      7 | import { disconnect } from '../../../functions/disconnect'
      8 | import FeelingsComp from '../../../Components/Profil/feelingsComp'
      9 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Profil/feelingsComp.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Reports/reportSidebar.test.jsx'

      4 | import ReportSidebar from '../../../Components/reports/reportSidebar'
      5 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 6 | import { BrowserRouter } from 'react-router-dom'
        | ^
      7 | import fetchMock from 'fetch-mock'
      8 |
      9 | describe('Feelings Component', () => {

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Reports/reportSidebar.test.jsx:6:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Popup/categoryCreation.test.jsx'

      2 | import '@testing-library/jest-dom'
      3 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 4 | import { BrowserRouter } from 'react-router-dom'
        | ^
      5 | import CategoryCreationPopupContent from '../../../Components/Popup/categoryCreation'
      6 | import fetchMock from 'fetch-mock'
      7 | import { disconnect } from '../../../functions/disconnect'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Popup/categoryCreation.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/SchoolAdmin/schoolAdmHomePage.jsx
      src/__tests__/Users/SchoolAdmin/schoolAdmHomePage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/SchoolAdmin/schoolAdmHomePage.jsx:2:1)
      at Object.require (src/__tests__/Users/SchoolAdmin/schoolAdmHomePage.test.jsx:3:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/__tests__/Components/Buttons/previousPage.test.jsx'

      2 | import { createMemoryHistory } from 'history'
      3 | import { WebsocketProvider } from '../../../contexts/websocket'
    > 4 | import { BrowserRouter } from 'react-router-dom'
        | ^
      5 | import '@testing-library/jest-dom'
      6 | import PreviousPage from '../../../Components/Buttons/previousPage'
      7 |

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/__tests__/Components/Buttons/previousPage.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Teacher/dashboardTeacher.jsx
      src/__tests__/Users/Teacher/dashboardTeacher.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Teacher/dashboardTeacher.jsx:2:1)
      at Object.require (src/__tests__/Users/Teacher/dashboardTeacher.test.jsx:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Buttons/previousPage.jsx'

    Require stack:
      src/Components/Buttons/previousPage.jsx
      src/Users/Public/noPage.jsx
      src/__tests__/Users/Public/noPage.test.js

      1 | import { React } from 'react'
    > 2 | import { useNavigate } from 'react-router-dom'
        | ^
      3 | import '../../css/Components/Buttons/button.css'
      4 |
      5 | export default function PreviousPage () {

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Buttons/previousPage.jsx:2:1)
      at Object.require (src/Users/Public/noPage.jsx:3:1)
      at Object.require (src/__tests__/Users/Public/noPage.test.js:4:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Admin/admHomePage.jsx
      src/__tests__/Users/Admin/admHomePage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Admin/admHomePage.jsx:2:1)
      at Object.require (src/__tests__/Users/Admin/admHomePage.test.jsx:3:1)


  ● Test suite failed to run

    Cannot find module 'react-router-dom' from 'src/Components/Header/headerComp.js'

    Require stack:
      src/Components/Header/headerComp.js
      src/Users/Shared/chatRoomPage.jsx
      src/__tests__/Components/ChatRoom/chatRoomPage.test.jsx

      2 | import backButton from '../../assets/backButton.png'
      3 | import '../../css/Components/Header/headerComp.scss'
    > 4 | import { useNavigate, useLocation, Link } from 'react-router-dom'
        | ^
      5 | import { WebsocketContext } from '../../contexts/websocket'
      6 | import Popup from 'reactjs-popup'
      7 | import moment from 'moment'

      at Resolver.resolveModule (node_modules/react-scripts/node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.require (src/Components/Header/headerComp.js:4:1)
      at Object.require (src/Users/Shared/chatRoomPage.jsx:2:1)
      at Object.require (src/__tests__/Components/ChatRoom/chatRoomPage.test.jsx:4:1)

Report generated by 🧪jest coverage report action from 9c1ddbd

Please sign in to comment.