小编Abh*_*mar的帖子

无法初始化监视插件“node_modules/jest-watch-typeahead/filename.js”:

我在项目中使用 React with TypeScript,并且正在进行快照测试,但是当我在 vscode 终端中运行 npm test 命令时,出现错误,我已将其附加在附件中。您能否让我知道我应该做什么才能使所有测试用例成功运行或我需要配置的任何其他内容

在此输入图像描述

这是我的 package.json

{
  "name": "vcc-collaboration-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@fluentui/react": "^8.42.1",
    "@fluentui/react-file-type-icons": "^8.5.6",
    "@testing-library/jest-dom": "^5.15.0",
    "@testing-library/react": "^11.2.7",
    "@testing-library/user-event": "^12.8.3",
    "@types/react-test-renderer": "^17.0.1",
    "ag-grid-community": "^26.2.0",
    "ag-grid-react": "^26.2.0",
    "axios": "^0.24.0",
    "babel-jest": "^26.6.0",
    "jest": "^26.6.0",
    "jest-watch-typeahead": "^1.0.0",
    "moment": "^2.29.1",
    "node-sass": "^6.0.1",
    "react": "^17.0.2",
    "react-bootstrap": "^2.0.2",
    "react-dom": "^17.0.2",
    "react-dropzone": "^11.4.2",
    "react-grid": "^4.0.4",
    "react-icons": "^4.3.1",
    "react-router-dom": "^5.0.0",
    "react-scripts": "4.0.3",
    "react-test-renderer": "^17.0.2",
    "vcc-ui": "^2.11.0",
    "web-vitals": "^1.1.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": …
Run Code Online (Sandbox Code Playgroud)

types unit-testing reactjs jestjs

45
推荐指数
3
解决办法
3万
查看次数

错误:无法获取本地颁发者证书

当我在 VS Code 终端中触发命令 npm install 时,我正在 VS Code 中的本地计算机中运行 Angular 应用程序,但出现以下错误

gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack     at TLSSocket.onConnectSecure (_tls_wrap.js:1497:34)
gyp ERR! stack     at TLSSocket.emit (events.js:315:20)
gyp ERR! stack     at TLSSocket._finishInit (_tls_wrap.js:932:8)
gyp ERR! stack     at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12)
gyp ERR! System Windows_NT 10.0.18363
Run Code Online (Sandbox Code Playgroud)

谁能让我知道如何纠正这个错误,因为我已经浪费了 3 天来克服这个错误,但仍然找不到。

javascript angular

3
推荐指数
1
解决办法
3万
查看次数

标签 统计

angular ×1

javascript ×1

jestjs ×1

reactjs ×1

types ×1

unit-testing ×1