React native 设置世博摩卡测试

React native 设置世博摩卡测试,react-native,mocha.js,expo,React Native,Mocha.js,Expo,我正在使用expo react native typescript应用程序。我想测试我的应用程序。为了测试应用程序,我计划使用mocha test。在expo文档中,我只找到了设置。我没有找到任何地方,如何设置摩卡测试。我找到了一些当地人的摩卡测试文章,但我感到困惑。如果有人帮我,那就太好了 这是应用程序结构图像 这是我的包.json { "main": "node_modules/expo/AppEntry.js", "scripts

我正在使用expo react native typescript应用程序。我想测试我的应用程序。为了测试应用程序,我计划使用mocha test。在expo文档中,我只找到了设置。我没有找到任何地方,如何设置摩卡测试。我找到了一些当地人的摩卡测试文章,但我感到困惑。如果有人帮我,那就太好了

这是应用程序结构图像

这是我的
包.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "clearcache": "expo r -c",
    "typecheck": "tsc",
    "test": "mocha"
  },
  "dependencies": {
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/bottom-tabs": "^5.10.0",
    "@react-navigation/native": "^5.8.0",
    "@react-navigation/stack": "^5.10.0",
    "@reduxjs/toolkit": "^1.4.0",
    "chai": "^4.2.0",
    "chai-http": "^4.3.0",
    "eslint-plugin-react": "^7.21.5",
    "eslint-plugin-react-hooks": "^4.2.0",
    "expo": "~39.0.2",
    "expo-secure-store": "~9.2.0",
    "expo-status-bar": "~1.0.2",
    "mocha": "^8.2.1",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz",
    "react-native-appearance": "^0.3.4",
    "react-native-flash-message": "^0.1.16",
    "react-native-gesture-handler": "~1.7.0",
    "react-native-modalize": "^2.0.6",
    "react-native-portalize": "^1.0.7",
    "react-native-reanimated": "~1.13.0",
    "react-native-safe-area-context": "3.1.4",
    "react-native-screens": "~2.10.1",
    "react-native-web": "~0.13.12",
    "react-redux": "^7.2.2",
    "styled-components": "^5.2.0"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "@types/react": "~16.9.35",
    "@types/react-dom": "~16.9.8",
    "@types/react-native": "~0.63.2",
    "@typescript-eslint/eslint-plugin": "^4.6.0",
    "@typescript-eslint/parser": "^4.6.0",
    "babel-plugin-module-resolver": "^4.0.0",
    "babel-preset-expo": "^8.3.0",
    "eslint": "^7.12.1",
    "eslint-import-resolver-babel-module": "^5.2.0",
    "typescript": "^3.9.7"
  },
  "private": true
}