为什么我在量角器中看不到任何像 .toBe () 这样的期望方法? [英] Why I am not able be see any expect methods like .toBe () in Protractor?
问题描述
为什么我在量角器中看不到expect的任何方法?
Why I am not able to see any methods for expect in protractor?
例如当在下面的量角器中使用expect时
For example when use expect in protractor like below
expect(true).toBe(true);
在点之后我没有找到任何如上所示的方法 toBe()
After the dot I don't find any method as shown above toBe()
C:\>npm -g list
C:\Users\x216526\AppData\Roaming\npm
+-- protractor@4.0.3
| +-- adm-zip@0.4.7
| +-- chalk@1.1.3
| | +-- ansi-styles@2.2.1
| | +-- escape-string-regexp@1.0.5
| | +-- has-ansi@2.0.0
| | | `-- ansi-regex@2.0.0
| | +-- strip-ansi@3.0.1
| | `-- supports-color@2.0.0
| +-- glob@7.0.5
| | +-- fs.realpath@1.0.0
| | +-- inflight@1.0.5
| | | `-- wrappy@1.0.2
| | +-- inherits@2.0.1
| | +-- minimatch@3.0.3
| | | `-- brace-expansion@1.1.6
| | | +-- balanced-match@0.4.2
| | | `-- concat-map@0.0.1
| | +-- once@1.3.3
| | `-- path-is-absolute@1.0.0
| +-- jasmine@2.4.1
| | +-- exit@0.1.2
| | +-- glob@3.2.11
| | | `-- minimatch@0.3.0
| | | +-- lru-cache@2.7.3
| | | `-- sigmund@1.0.1
| | `-- jasmine-core@2.4.1
| +-- jasminewd2@0.0.9
| +-- optimist@0.6.1
| | +-- minimist@0.0.10
| | `-- wordwrap@0.0.3
| +-- protractor-html-screenshot-reporter@0.0.21 extraneous
| +-- protractor-jasmine2-html-reporter@0.0.6 extraneous
| +-- protractor-jasmine2-screenshot-reporter@0.2.0 extraneous
| +-- q@1.4.1
还请告诉我他们是否有任何直接命令可以像 protractor --version
一样找到 Jasmine 版本.
Please also tell me if their is any direct command to find the Jasmine version just like protractor --version
.
推荐答案
@Balaji,如果我正确理解了问题,您想在量角器中看到像 toBe
这样的 expect 方法吗?您可以在全局量角器文件夹中检查它,在您的情况下打开 C:\Users\x216526\AppData\Roaming\npm/protractor4.0.3
@Balaji, If I understood the question correctly you want to see the expect methods like toBe
inside protractor? you can check it inside your global protractor folder, in your case open C:\Users\x216526\AppData\Roaming\npm/protractor4.0.3
- 您可以在 package.json 中查看 Jasmine 版本 -
- 您可以像这样在 jasmine 核心中的 node_modules 中找到 jasmine 匹配器,即期望方法
toBe
-
- You can find the jasmine matchers i.e expect methods
toBe
inside the node_modules in jasmine core like this-
这篇关于为什么我在量角器中看不到任何像 .toBe () 这样的期望方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!