jasmine-auto-spies
Advanced tools
Comparing version 5.0.2 to 5.1.0
{ | ||
"name": "jasmine-auto-spies", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"repository": { | ||
@@ -59,8 +59,7 @@ "type": "git", | ||
"awesome-typescript-loader": "^3.1.3", | ||
"commitizen": "2.10.1", | ||
"core-js": "^2.4.1", | ||
"commitizen": "3.1.2", | ||
"cz-conventional-changelog": "2.1.0", | ||
"husky": "1.0.0-rc.13", | ||
"husky": "2.0.0", | ||
"istanbul-instrumenter-loader": "3.0.1", | ||
"jasmine": "^2.6.0", | ||
"jasmine": "3.5.0", | ||
"jasmine-given": "^2.6.4", | ||
@@ -92,3 +91,3 @@ "karma": "^1.7.0", | ||
"peerDependencies": { | ||
"jasmine": "^2.6.0", | ||
"jasmine": ">=2.6.0 <=3.5.0", | ||
"rxjs": "^6.0.0", | ||
@@ -95,0 +94,0 @@ "typescript": ">=2.8.1" |
@@ -44,2 +44,6 @@ # jasmine-auto-spies | ||
`yarn add -D jasmine-auto-spies` | ||
or | ||
`npm install -D jasmine-auto-spies` | ||
@@ -46,0 +50,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { Subject } from 'rxjs'; | ||
export interface SpyFunctionReturnValueContainer { | ||
@@ -14,2 +15,3 @@ value: any; | ||
complete?(): void; | ||
returnSubject?<R = any>(): Subject<R>; | ||
} |
@@ -23,2 +23,6 @@ "use strict"; | ||
}; | ||
spyFunction.and.returnSubject = function complete() { | ||
valueContainer.value = subject; | ||
return subject; | ||
}; | ||
} | ||
@@ -45,2 +49,6 @@ exports.observablifySpyFunction = observablifySpyFunction; | ||
}; | ||
calledWithObject.returnSubject = function () { | ||
calledWithObject.argsToValuesMap.set(calledWithArgs, subject); | ||
return subject; | ||
}; | ||
return calledWithObject; | ||
@@ -47,0 +55,0 @@ } |
/// <reference types="jasmine" /> | ||
import { Observable } from 'rxjs'; | ||
import { Observable, Subject } from 'rxjs'; | ||
export declare type Spy<T> = { | ||
@@ -16,2 +16,3 @@ [k in keyof T]: AddSpyTypes<T[k]>; | ||
complete(): void; | ||
returnSubject<R = any>(): Subject<R>; | ||
} | ||
@@ -18,0 +19,0 @@ export interface SpyMethod { |
Sorry, the diff of this file is not supported yet
41709
34
436
242