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

Alone Together

Alone Together

Sherry Turkle / Basic Books / 2011-1-11 / USD 28.95

Consider Facebookit’s human contact, only easier to engage with and easier to avoid. Developing technology promises closeness. Sometimes it delivers, but much of our modern life leaves us less connect......一起来看看 《Alone Together》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具