JavaScript/TypeScript 测试框架 MoqJS

码农软件 · 软件分类 · 单元测试工具 · 2019-11-18 11:11:50

软件介绍

MoqJS 是基于 .NET Moq 框架的 JavaScript/TypeScript 测试框架。

主要特性:

  • 强类型:TypeScript

  • 完美的 VS 集成

  • 使用 setup/setupPrivate/verify/verifyPrivate 来修改和检测 moles behavior

  • 非常低的学习曲线

示例代码:

// Create some object instance
var dog = new Dog();

// Create a mole for the object
var mole = new Mole(dog);

// Setup behavior
mole.setup(_dog => _dog.eat('meat')).returns('Yum yum yum');

// Invoke
var result = dog.eath('meat');

// Verify the given method was indeed called with the expected value exactly once
var isVerified = mole.verify(_dog => _dog.eat('meat'), Times.exact(1));

本文地址:https://codercto.com/soft/d/19249.html

Ajax设计模式

Ajax设计模式

Michael Mahemoff / 杨仁和 / 电子工业出版社 / 2007-5 / 78.00元

★本书荣获LinuxWorld Linux Journal2006年Editors' Choice awards。    ★绝好的一本ajax 高级读物,建议 每个web 程序员都需要买一本,了解什么是真正的好的web设计--网友   [精彩试读一]   [精彩试读二] 本书是一本关于复杂Ajax应用的整体架构设计......一起来看看 《Ajax设计模式》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

在线进制转换器
在线进制转换器

各进制数互转换器