rxjs-marbles
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -2018,2 +2018,13 @@ /*MIT license https://github.com/cartant/rxjs-marbles/blob/master/LICENSE*/ | ||
function assertArgs(observable) { | ||
if (!observable[argsSymbol]) { | ||
throw new Error("Expected a hot or cold test observable."); | ||
} | ||
} | ||
function assertSubscriptions(observable) { | ||
if (!observable["subscriptions"]) { | ||
throw new Error("Expected a hot or cold test observable with subscriptions."); | ||
} | ||
} | ||
var Expect = (function () { | ||
@@ -2025,2 +2036,3 @@ function Expect(actual, testScheduler) { | ||
Expect.prototype.toBeObservable = function (expected) { | ||
assertArgs(expected); | ||
var _a = this, actual = _a.actual, testScheduler = _a.testScheduler; | ||
@@ -2032,2 +2044,3 @@ var _b = expected[argsSymbol], error = _b.error, marbles = _b.marbles, values = _b.values; | ||
var _a = this, actual = _a.actual, testScheduler = _a.testScheduler; | ||
assertSubscriptions(actual); | ||
testScheduler.expectSubscriptions(actual.subscriptions).toBe(expected); | ||
@@ -2050,2 +2063,3 @@ }; | ||
Context.prototype.equal = function (actual, expected) { | ||
assertArgs(expected); | ||
var testScheduler = this.testScheduler; | ||
@@ -2064,2 +2078,3 @@ var _a = expected[argsSymbol], error = _a.error, marbles = _a.marbles, values = _a.values; | ||
Context.prototype.has = function (actual, expected) { | ||
assertSubscriptions(actual); | ||
var testScheduler = this.testScheduler; | ||
@@ -2066,0 +2081,0 @@ testScheduler.expectSubscriptions(actual.subscriptions).toBe(expected); |
@@ -0,1 +1,8 @@ | ||
<a name="1.2.0"></a> | ||
## [1.2.0](https://github.com/cartant/rxjs-marbles/compare/v1.1.0...v1.2.0) (2017-07-22) | ||
### Feature | ||
* **context**: Assert test observable args and subscriptions. ([024cc16](https://github.com/cartant/rxjs-marbles/commit/024cc16)) | ||
<a name="1.1.0"></a> | ||
@@ -2,0 +9,0 @@ ## [1.1.0](https://github.com/cartant/rxjs-marbles/compare/v1.0.2...v1.1.0) (2017-07-21) |
import { argsSymbol } from "./args"; | ||
import { assertArgs, assertSubscriptions } from "./assert"; | ||
import { configure } from "./configuration"; | ||
@@ -16,2 +17,3 @@ import { Expect } from "./expect"; | ||
Context.prototype.equal = function (actual, expected) { | ||
assertArgs(expected); | ||
var testScheduler = this.testScheduler; | ||
@@ -30,2 +32,3 @@ var _a = expected[argsSymbol], error = _a.error, marbles = _a.marbles, values = _a.values; | ||
Context.prototype.has = function (actual, expected) { | ||
assertSubscriptions(actual); | ||
var testScheduler = this.testScheduler; | ||
@@ -32,0 +35,0 @@ testScheduler.expectSubscriptions(actual.subscriptions).toBe(expected); |
import { argsSymbol } from "./args"; | ||
import { assertArgs, assertSubscriptions } from "./assert"; | ||
var Expect = (function () { | ||
@@ -8,2 +9,3 @@ function Expect(actual, testScheduler) { | ||
Expect.prototype.toBeObservable = function (expected) { | ||
assertArgs(expected); | ||
var _a = this, actual = _a.actual, testScheduler = _a.testScheduler; | ||
@@ -15,2 +17,3 @@ var _b = expected[argsSymbol], error = _b.error, marbles = _b.marbles, values = _b.values; | ||
var _a = this, actual = _a.actual, testScheduler = _a.testScheduler; | ||
assertSubscriptions(actual); | ||
testScheduler.expectSubscriptions(actual.subscriptions).toBe(expected); | ||
@@ -17,0 +20,0 @@ }; |
@@ -40,3 +40,3 @@ { | ||
"unpkg": "./bundles/rxjs-marbles.umd.js", | ||
"version": "1.1.0" | ||
"version": "1.2.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
82807
21
2188