1. <legend id='iUSMT'><style id='iUSMT'><dir id='iUSMT'><q id='iUSMT'></q></dir></style></legend><tfoot id='iUSMT'></tfoot>
  2. <i id='iUSMT'><tr id='iUSMT'><dt id='iUSMT'><q id='iUSMT'><span id='iUSMT'><b id='iUSMT'><form id='iUSMT'><ins id='iUSMT'></ins><ul id='iUSMT'></ul><sub id='iUSMT'></sub></form><legend id='iUSMT'></legend><bdo id='iUSMT'><pre id='iUSMT'><center id='iUSMT'></center></pre></bdo></b><th id='iUSMT'></th></span></q></dt></tr></i><div id='iUSMT'><tfoot id='iUSMT'></tfoot><dl id='iUSMT'><fieldset id='iUSMT'></fieldset></dl></div>
      <bdo id='iUSMT'></bdo><ul id='iUSMT'></ul>

    1. <small id='iUSMT'></small><noframes id='iUSMT'>

      错误:无法读取属性提取.使用 jest-expo 和 react native

      Error : Cannot read property fetch. Using jest-expo with react native(错误:无法读取属性提取.使用 jest-expo 和 react native)

          <small id='omPct'></small><noframes id='omPct'>

          • <bdo id='omPct'></bdo><ul id='omPct'></ul>
          • <tfoot id='omPct'></tfoot>
              <tbody id='omPct'></tbody>

                <i id='omPct'><tr id='omPct'><dt id='omPct'><q id='omPct'><span id='omPct'><b id='omPct'><form id='omPct'><ins id='omPct'></ins><ul id='omPct'></ul><sub id='omPct'></sub></form><legend id='omPct'></legend><bdo id='omPct'><pre id='omPct'><center id='omPct'></center></pre></bdo></b><th id='omPct'></th></span></q></dt></tr></i><div id='omPct'><tfoot id='omPct'></tfoot><dl id='omPct'><fieldset id='omPct'></fieldset></dl></div>
                <legend id='omPct'><style id='omPct'><dir id='omPct'><q id='omPct'></q></dir></style></legend>

                本文介绍了错误:无法读取属性提取.使用 jest-expo 和 react native的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                TypeError:无法读取未定义的获取"属性

                TypeError: Cannot read property 'fetch' of undefined

                  at node_modules/whatwg-fetch/fetch.js:4:8
                  at Object.<anonymous> (node_modules/whatwg-fetch/fetch.js:466:3)
                  at Object.<anonymous> (node_modules/jest-expo/src/setup.js:97:348)
                

                使用 jest-expo 运行测试时出错.如果有人有解决方案,请分享.

                Got error while running tests with jest-expo. If anyone have solution please share.

                推荐答案

                显然这是没有代码片段的猜测,但是看当时 fetch.js 的样子,undefined 值,其 fetch 属性是变量 self (参见第 1 行),它被设置为 this 上下文(参见第 466 行).

                Obviously this is a guess without a code snippet, but looking at what fetch.js looked like at the time, the undefined value whose fetch property we can't read is the variable self (see line 1), which was meant to be set to the this context (see line 466).

                因此,似乎 fetch.js 期望在 this 引用 window 的环境中运行,但 jest-expo,作为一个测试工具,正在其他一些环境中运行它,可能是在 thisundefined 的严格模式下.

                Therefore, it seems that fetch.js is expecting to run in an environment where this refers to the window, but jest-expo, being a testing tool, is running it in some other environment, probably in strict mode where this is undefined.

                这篇关于错误:无法读取属性提取.使用 jest-expo 和 react native的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
                问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
                Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)
                CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                Ordinals in words javascript(javascript中的序数)
                  <tbody id='4Hdfs'></tbody>

                <small id='4Hdfs'></small><noframes id='4Hdfs'>

                <i id='4Hdfs'><tr id='4Hdfs'><dt id='4Hdfs'><q id='4Hdfs'><span id='4Hdfs'><b id='4Hdfs'><form id='4Hdfs'><ins id='4Hdfs'></ins><ul id='4Hdfs'></ul><sub id='4Hdfs'></sub></form><legend id='4Hdfs'></legend><bdo id='4Hdfs'><pre id='4Hdfs'><center id='4Hdfs'></center></pre></bdo></b><th id='4Hdfs'></th></span></q></dt></tr></i><div id='4Hdfs'><tfoot id='4Hdfs'></tfoot><dl id='4Hdfs'><fieldset id='4Hdfs'></fieldset></dl></div>

                  <tfoot id='4Hdfs'></tfoot>
                  • <bdo id='4Hdfs'></bdo><ul id='4Hdfs'></ul>
                      • <legend id='4Hdfs'><style id='4Hdfs'><dir id='4Hdfs'><q id='4Hdfs'></q></dir></style></legend>