Fix test error: RNDocumentPicker
Description
-
What: https://git.mahara.org/mahara-mobile/mahara-mobile/-/jobs/4207 -
When: testing addEditHelperFunctions.txt
on function `pickDocument' -
How:
● Cannot log after tests are done. Did you forget to wait for something async in your test?
Attempted to log "RNDocumentPicker: Native module is not available, make sure you have finished the installation process and rebuilt your app".
at console.warn (node_modules/@jest/console/build/BufferedConsole.js:224:10)
at registerWarning (node_modules/react-native/Libraries/LogBox/LogBox.js:115:21)
at warnImpl (node_modules/react-native/Libraries/LogBox/LogBox.js:52:25)
at console.Object.<anonymous>.console.warn (node_modules/react-native/Libraries/LogBox/LogBox.js:29:14)
at Timeout._onTimeout (node_modules/react-native-document-picker/index.js:26:13)
ReferenceError: You are trying to `import` a file after the Jest environment has been torn down.
Edited by Doris Tam