tsmockit 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Mock/Mock.js +2 -2
- package/Mock/SignatureService.js +2 -2
- package/Mock/module.js +2 -2
- package/Utility/module.js +3 -3
- package/package.json +1 -1
- package/public_api.js +2 -2
package/Mock/Mock.js
CHANGED
|
@@ -68,7 +68,7 @@ var Mock = /** @class */ (function () {
|
|
|
68
68
|
var memberSignatureMap = this.memberSignatureMaps.find(function (m) { return m.signature === signature; });
|
|
69
69
|
if (timesCalled !== times) {
|
|
70
70
|
// eslint-disable-next-line no-console
|
|
71
|
-
console.log("Actual calls made for, \""
|
|
71
|
+
console.log("Actual calls made for, \"".concat(signature, ":"), memberSignatureMap === null || memberSignatureMap === void 0 ? void 0 : memberSignatureMap.functionMaps.map(function (m) { return "".concat(m.originalSignature, " x ").concat(m.timesCalled); }));
|
|
72
72
|
}
|
|
73
73
|
expect(timesCalled).toEqual(times, timesCalled !== times ? '' : undefined);
|
|
74
74
|
};
|
|
@@ -117,7 +117,7 @@ var Mock = /** @class */ (function () {
|
|
|
117
117
|
functionMapsUsingAny.forEach(function (element) {
|
|
118
118
|
if (!functionMapForArgs) {
|
|
119
119
|
var anyTransposedState_1 = new Array();
|
|
120
|
-
args.forEach(function (a, i) { return anyTransposedState_1[i] = element.state[i] === Any_1.ANY_VALUE ? Any_1.ANY_VALUE : a; });
|
|
120
|
+
args.forEach(function (a, i) { return anyTransposedState_1[i] = (a !== undefined && element.state[i] === Any_1.ANY_VALUE) ? Any_1.ANY_VALUE : a; });
|
|
121
121
|
functionMapForArgs = signatureFunctionMaps === null || signatureFunctionMaps === void 0 ? void 0 : signatureFunctionMaps.find(function (m) { return JSON.stringify(m.state) === JSON.stringify(anyTransposedState_1); });
|
|
122
122
|
}
|
|
123
123
|
});
|
package/Mock/SignatureService.js
CHANGED
|
@@ -52,7 +52,7 @@ var SignatureService = /** @class */ (function () {
|
|
|
52
52
|
memberSignature = operationNameMatches[1];
|
|
53
53
|
if (operationNameMatches[2]) {
|
|
54
54
|
var paramString = SignatureService.getParamString(operationNameMatches);
|
|
55
|
-
memberSignature += "("
|
|
55
|
+
memberSignature += "(".concat(paramString, ")");
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
58
|
memberSignature += '()';
|
|
@@ -84,7 +84,7 @@ var SignatureService = /** @class */ (function () {
|
|
|
84
84
|
.match(Constants_1.Regex.Params);
|
|
85
85
|
var params = '';
|
|
86
86
|
for (var index = 0; index < (paramStrings ? paramStrings.length : 0); index++) {
|
|
87
|
-
params += ((index > 0 ? ', ' : ''
|
|
87
|
+
params += ("".concat(index > 0 ? ', ' : '', "p").concat(index));
|
|
88
88
|
}
|
|
89
89
|
return params;
|
|
90
90
|
};
|
package/Mock/module.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Any = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
tslib_1.__exportStar(require("./Mock"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./Times"), exports);
|
|
7
7
|
var Any_1 = require("./Any");
|
|
8
8
|
Object.defineProperty(exports, "Any", { enumerable: true, get: function () { return Any_1.Any; } });
|
|
9
9
|
//# sourceMappingURL=module.js.map
|
package/Utility/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./EmitEventAtElement"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./EmitKeyEventAtElement"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./Expect"), exports);
|
|
7
7
|
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
package/public_api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./Mock/module"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./Utility/module"), exports);
|
|
6
6
|
//# sourceMappingURL=public_api.js.map
|