Comparing version 1.2.0 to 1.2.1
@@ -0,1 +1,7 @@ | ||
v1.2.1 / 2017-02-28 | ||
=================== | ||
* improve doc on 'setup' and function dynamic mocking | ||
* remove @types/lodash as a runtime dependency | ||
v1.2.0 / 2017-02-07 | ||
@@ -5,3 +11,3 @@ =================== | ||
* support dynamic mocking of Function.prototype | ||
* remove @type/node as a runtime dependency | ||
* remove @types/node as a runtime dependency | ||
@@ -8,0 +14,0 @@ v1.1.0 / 2017-01-03 |
{ | ||
"name": "typemoq", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A simple mocking library for TypeScript", | ||
@@ -36,3 +36,2 @@ "author": "Florin Nitoi <florin.nitoi@gmail.com>", | ||
"dependencies": { | ||
"@types/lodash": "^4.14.37", | ||
"lodash": "^4.16.4", | ||
@@ -43,2 +42,3 @@ "postinstall-build": "^2.1.3" | ||
"@types/chai": "^3.4.34", | ||
"@types/lodash": "^4.14.37", | ||
"@types/mocha": "^2.2.32", | ||
@@ -45,0 +45,0 @@ "@types/node": "^6.0.45", |
@@ -154,5 +154,13 @@ TypeMoq [![build badge](https://travis-ci.org/florinn/typemoq.svg?branch=master)](https://travis-ci.org/florinn/typemoq) | ||
Dynamic mocks can be created from type parameters, both classes and interfaces being supported. | ||
A dynamic mock is created by specifying a type parameter. | ||
The following type parameters are supported: | ||
* `Function` (as the type of a [function object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)) | ||
* a class type | ||
* an interface type | ||
```typescript | ||
// Using Function as type parameter | ||
let mock: TypeMoq.IMock<Function> = TypeMoq.Mock.ofType<Function>(); | ||
// Using class as type parameter | ||
@@ -181,2 +189,4 @@ let mock: TypeMoq.IMock<Bar> = TypeMoq.Mock.ofType<Bar>(); | ||
`setup` accepts a function (also referred as 'matcher') taking as input argument the type being mocked and as body the value/property/method (with arguments if that's the case) to match. | ||
##### Parameter matchers | ||
@@ -183,0 +193,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
406558
2
596
30
- Removed@types/lodash@^4.14.37
- Removed@types/lodash@4.17.7(transitive)