@fluffy-spoon/substitute
Advanced tools
Comparing version 1.129.0 to 1.130.0
@@ -34,6 +34,4 @@ "use strict"; | ||
return true; | ||
if (typeof x === 'undefined') | ||
return true; | ||
if (type === 'array') | ||
return x && Array.isArray(x); | ||
return Array.isArray(x); | ||
return typeof x === type; | ||
@@ -40,0 +38,0 @@ }); |
import { ContextState, PropertyKey } from "./ContextState"; | ||
import { Context } from "src/Context"; | ||
import { Context } from "../Context"; | ||
import { Call } from "../Utilities"; | ||
@@ -4,0 +4,0 @@ import { GetPropertyState } from "./GetPropertyState"; |
@@ -23,3 +23,3 @@ "use strict"; | ||
getCallCount(args) { | ||
return this._calls.reduce((count, cargs) => Utilities_1.areArgumentArraysEqual(cargs, args) ? count + 1 : count, 0); | ||
return this._calls.filter(callArgs => Utilities_1.areArgumentArraysEqual(callArgs, args)).length; | ||
} | ||
@@ -26,0 +26,0 @@ apply(context, args) { |
import { ContextState, PropertyKey } from "./ContextState"; | ||
import { Context } from "src/Context"; | ||
import { Context } from "../Context"; | ||
import { FunctionState } from "./FunctionState"; | ||
@@ -4,0 +4,0 @@ export declare class GetPropertyState implements ContextState { |
import { ContextState, PropertyKey } from "./ContextState"; | ||
import { Context } from "src/Context"; | ||
import { Context } from "../Context"; | ||
import { GetPropertyState } from "./GetPropertyState"; | ||
@@ -4,0 +4,0 @@ import { SetPropertyState } from "./SetPropertyState"; |
import { ContextState, PropertyKey } from "./ContextState"; | ||
import { Context } from "src/Context"; | ||
import { Context } from "../Context"; | ||
export declare class SetPropertyState implements ContextState { | ||
@@ -4,0 +4,0 @@ private _property; |
@@ -24,3 +24,3 @@ /// <reference types="node" /> | ||
type: SubstituteExceptionTypes; | ||
private constructor(); | ||
constructor(msg: string, exceptionType?: SubstituteExceptionTypes); | ||
static forCallCountMissMatch(callCount: { | ||
@@ -27,0 +27,0 @@ expected: number | null; |
{ | ||
"name": "@fluffy-spoon/substitute", | ||
"version": "1.129.0", | ||
"version": "1.130.0", | ||
"description": "An NSubstitute port to TypeScript called substitute.js.", | ||
@@ -18,6 +18,5 @@ "main": "dist/src/index.js", | ||
"devDependencies": { | ||
"@ava/typescript": "^1.1.1", | ||
"@types/node": "latest", | ||
"@ava/typescript": "^1.1.0", | ||
"ava": "^3.7.0", | ||
"typescript": "^3.8.3" | ||
"typescript": "^3.0.0" | ||
}, | ||
@@ -34,3 +33,2 @@ "ava": { | ||
"cache": false, | ||
"concurrency": 1, | ||
"failFast": true, | ||
@@ -37,0 +35,0 @@ "failWithoutAssertions": true |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3
116384
987