Listing 9. Contents of demo/doh/tests/module.js
清单9.demo/doh/tests/module.js的内容
Lastly, the DOH is not limited to browser environments.
最后,DOH不只限于浏览器环境。
Doh! Sugar-rich treats, like doughnuts, can speed up the ageing process
哎!多糖甜品,如甜甜圈,会加速衰老进程。
This function lets you point the DOH runner.html UI at a separate HTML file.
此函数能让DOHrunner.htmlUI 指向另一个 HTML文件。
Bringing it all together: Combining the test definitions into a single DOH test suite.
把它们放在一起:将测试定义合并到单个doh测试套件中。
Testing the behavior of Ajax requests is one of the most valuable features of the DOH.
测试ajax请求的行为是DOH最有价值的特点之一。
If any type of exception is thrown in a unit test, the DOH declares the entire test as failed.
如果在一个单元测试中有任何类型的异常被抛出,DOH就会宣布整个测试失败。
When all test files have been loaded by the DOH the framework automatically executes the tests.
当所有测试文件都由doh加载后,此框架就会自动执行这些测试。
The DOH also provides a powerful UI that shows success, failures, and even what errors were thrown.
DOH还提供了一个强大的UI ,可用来显示成功或失败甚至抛出的错误。
But several tobacco manufacturers sued the DoH, questioning the validity of the administrative order.
但是一些烟草制造商起诉卫生部,对行政法令的有效性提出质疑。
While the DOH can be daunting for the novice user, it is a flexible and powerful unit testing framework.
尽管DOH对一个新手来说有些复杂,但它的确是一个灵活且强大的单元测试框架。
As previously mentioned, the DOH provides a command-line interface as well as a browser-based interface.
前面提到过,DOH既提供命令行界面,又提供了基于浏览器的界面。
You create an array of functions or test fixtures, register them, and the DOH will execute them when loaded.
只需创建一个函数数组或测试装置、然后对之进行注册,加载后,DOH就会执行它们。
Writing your own test suite with the DOH can appear daunting at first, but it is actually not very difficult.
用DOH编写自已的测试套件初看上去很复杂,但实际上它并不难。
It would be great if the DOH provided a mechanism that could still run this HTML file and still display the UI.
要是DOH能提供一个既能运行HTML文件又能显示UI的机制就好了。
When the unit tests are invoked, the DOH reports any errors that occurred and the specific test that has failed.
当调用单元测试时,DOH就会报告所有已发生的错误及失败的特定测试。
Every test framework needs to supply you with a method to check the outcome of a unit test and the DOH is no exception.
每个测试框架都要为开发人员提供检查单元测试结果的方法,DOH也不例外。
"It was the most stupid decision of my whole life," said Jack as he let out a Homer Simpson-style "Doh" to illustrate the folly of his actions.
“这是我此生做的最错误的决定,”杰克说,同时以霍默·辛普森式的“Doh”来表示自己行为的愚蠢。
The event, known as the Ultimate Block Party , featured games like I Spy, mounds of Play-Doh, sidewalk chalk, building blocks, puzzles and more.
这次聚会又被称为:终极街边聚会,有许多有特色的游戏,比如“我是密探”,成堆的培乐多彩泥,人行道上的粉笔彩绘,成堆积木,谜题等等。
With the asyncEcho test, it wraps the asserts in a try/catch, and any errors are passed back to the DOH through the deferred.errback(error) call.
对于asyncEcho测试,它将断言包装进一个try/catch 程序块,并且,任何错误都将通过 deferred.errback(error) 调用被传递回DOH。
A recent survey conducted by the Department of Health (DOH) showed that one out of every four junior high school students is currently overweight.
卫生部最近作出的调查显示,四分之一的初中生有肥胖问题。
The DOH also allows you to specify a custom timeout in milliseconds that will fail the test if a response is not returned within the specified time.
DOH还允许以毫秒为单位设定超时值,一旦响应没有在指定的时间内返回,测试就会失败。
The DOH framework is extremely flexible in how tests can be defined and loaded, so often the load flow can be modified to suit your particular structure.
DOH框架对如何定义和加载测试的要求很灵活,通常可以修改加载流程以适合您具体的结构。
Finally an example case was offered to indicate that the method of DOH could rationally and effectively decide to choose the power parameter of motive sources.
并结合实例说明该混合度的设计方法可合理、有效地确定动力源的功率参数。
If the DOH is unaware that the test is asynchronous, after the code of the test is executed the DOH believes that the test is complete and no errors have occurred.
如果DOH不知道这个测试是异步的,那么在此测试的代码执行之后,DOH就会认为此测试已完成,没有错误发生。
The great news is that the DOH provides a good framework and method for registering tests that require a Web browser to load an HTML file that instantiates the widgets to be tested.
还好,DOH为注册测试提供了一个很好的框架和方法,这些测试一般需要Web浏览器加载一个HTML文件,该文件用于实例化要测试的小部件。
Aiming at a parallel hybrid electric vehicle (HEV), a design method of degree of hybridization (DOH), mainly about the constraint, side value condition and compute method of DOH was introduced.
提出了并联型混合动力汽车的混合度设计方法,重点讨论混合度设计的约束条件、边值条件及其计算方法。
Aiming at a parallel hybrid electric vehicle (HEV), a design method of degree of hybridization (DOH), mainly about the constraint, side value condition and compute method of DOH was introduced.
提出了并联型混合动力汽车的混合度设计方法,重点讨论混合度设计的约束条件、边值条件及其计算方法。
应用推荐