我们可以将哪些茉莉花预期条件用于测试用例?

What are all of jasmine expected conditions we can use for a test case?

我们可以在测试用例中使用一些预期条件,例如 toBe、toEqual...。

expect('an expression').toBe('a value');
expect('an expression').toEqual('a value');
expect('an expression').*('a value');

我需要知道我可以使用的关键字域而不是 *

试试下面的 expect 语句

expect(array).toContain(member);

如果整个 array 包含特定的 member,则此语句将通过。

希望对你有帮助

如果我正确理解了你的问题this 页面列出了 jasmine 匹配器。