mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fail tests when context propTypes validation fails (#5323)
* Fail test when context proptypes validation fails * Remove isRequired from context propTypes validation GitOrigin-RevId: c6da5f93672434c0d80be3f659c1fc15dc3dab1f
This commit is contained in:
parent
4adf32cb43
commit
a4799c29b6
2 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ export default function FileViewHeader({ file, storeReferencesKeys }) {
|
|||
_id: PropTypes.string.isRequired,
|
||||
})
|
||||
const { permissionsLevel } = useEditorContext({
|
||||
permissionsLevel: PropTypes.string.isRequired,
|
||||
permissionsLevel: PropTypes.string,
|
||||
})
|
||||
const { t } = useTranslation()
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ before(function () {
|
|||
originalConsoleError(message, ...args)
|
||||
|
||||
// Check if the error is from prop-types
|
||||
if (/Failed prop type/.test(message)) {
|
||||
if (/Failed (prop|data) type/.test(message)) {
|
||||
// Throw an error, causing the test to fail
|
||||
throw new Error(message)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue