QUnit,断言不行吗? [英] QUnit, assert not OK?
本文介绍了QUnit,断言不行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
抱歉,如果这很明显,但是如果我们想断言某个方法返回 false,QUnit 中是否有 notOK 或等效函数?
Sorry if this is obvious, but is there a notOK or equivalent function in QUnit, if we want to assert that a method returns false?
我在文档中看不到否定确定的方法.
I can't see a way to negate OK in the documentation.
我试过了:
!ok...
但这没有用.
推荐答案
你可以使用:ok(!method_expected_to_be_false)
这篇关于QUnit,断言不行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文