问题描述
为什么我在量角器中看不到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
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected] extraneous
| +-- [email protected] extraneous
| +-- [email protected] extraneous
| +-- [email protected]
还请告诉我他们是否有任何直接命令可以像 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 () 这样的期望方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!