jasmine-marbles
Advanced tools
Comparing version 0.3.1 to 0.4.0
@@ -5,3 +5,3 @@ (function (global, factory) { | ||
(factory((global['jasmine-marbles'] = global['jasmine-marbles'] || {}),global.Rx,global.Rx,global._)); | ||
}(this, (function (exports,rxjs,rxjs_testing,_) { 'use strict'; | ||
}(this, (function (exports,rxjs,rxjs_testing,lodash) { 'use strict'; | ||
@@ -243,3 +243,3 @@ /** | ||
expected = expected.map(deleteErrorNotificationStack); | ||
var passed = _.isEqual(actual, expected); | ||
var passed = lodash.isEqual(actual, expected); | ||
if (passed) { | ||
@@ -315,9 +315,9 @@ return; | ||
function hot(marbles, values, error) { | ||
return new TestHotObservable(marbles, values, error); | ||
return new TestHotObservable(marbles.trim(), values, error); | ||
} | ||
function cold(marbles, values, error) { | ||
return new TestColdObservable(marbles, values, error); | ||
return new TestColdObservable(marbles.trim(), values, error); | ||
} | ||
function time(marbles) { | ||
return getTestScheduler().createTime(marbles); | ||
return getTestScheduler().createTime(marbles.trim()); | ||
} | ||
@@ -335,3 +335,3 @@ /* | ||
frame: scheduler.frame - outerFrame, | ||
notification: rxjs.Notification.createNext(value), | ||
notification: rxjs.Notification.createNext(value) | ||
}); | ||
@@ -341,3 +341,3 @@ }, function (err) { | ||
frame: scheduler.frame - outerFrame, | ||
notification: rxjs.Notification.createError(err), | ||
notification: rxjs.Notification.createError(err) | ||
}); | ||
@@ -347,3 +347,3 @@ }, function () { | ||
frame: scheduler.frame - outerFrame, | ||
notification: rxjs.Notification.createComplete(), | ||
notification: rxjs.Notification.createComplete() | ||
}); | ||
@@ -363,3 +363,3 @@ }); | ||
return { pass: true }; | ||
}, | ||
} | ||
}); }, | ||
@@ -380,3 +380,3 @@ toBeObservable: function () { return ({ | ||
frame: scheduler.frame, | ||
notification: rxjs.Notification.createNext(value), | ||
notification: rxjs.Notification.createNext(value) | ||
}); | ||
@@ -386,3 +386,3 @@ }, function (err) { | ||
frame: scheduler.frame, | ||
notification: rxjs.Notification.createError(err), | ||
notification: rxjs.Notification.createError(err) | ||
}); | ||
@@ -392,3 +392,3 @@ }, function () { | ||
frame: scheduler.frame, | ||
notification: rxjs.Notification.createComplete(), | ||
notification: rxjs.Notification.createComplete() | ||
}); | ||
@@ -401,4 +401,4 @@ }); | ||
return { pass: true }; | ||
}, | ||
}); }, | ||
} | ||
}); } | ||
}); | ||
@@ -405,0 +405,0 @@ } |
@@ -13,3 +13,9 @@ import { TestColdObservable, TestHotObservable } from './src/test-observables'; | ||
} | ||
namespace jest { | ||
interface Matchers<T> { | ||
toBeObservable: any; | ||
toHaveSubscriptions: any; | ||
} | ||
} | ||
} | ||
export declare function addMatchers(): void; |
import { Notification, Observable } from 'rxjs'; | ||
import { TestScheduler } from 'rxjs/testing'; | ||
import { getTestScheduler, initTestScheduler, resetTestScheduler, } from './src/scheduler'; | ||
import { TestColdObservable, TestHotObservable, } from './src/test-observables'; | ||
export { getTestScheduler, initTestScheduler, resetTestScheduler, } from './src/scheduler'; | ||
import { getTestScheduler, initTestScheduler, resetTestScheduler } from './src/scheduler'; | ||
import { TestColdObservable, TestHotObservable } from './src/test-observables'; | ||
export { getTestScheduler, initTestScheduler, resetTestScheduler } from './src/scheduler'; | ||
export function hot(marbles, values, error) { | ||
return new TestHotObservable(marbles, values, error); | ||
return new TestHotObservable(marbles.trim(), values, error); | ||
} | ||
export function cold(marbles, values, error) { | ||
return new TestColdObservable(marbles, values, error); | ||
return new TestColdObservable(marbles.trim(), values, error); | ||
} | ||
export function time(marbles) { | ||
return getTestScheduler().createTime(marbles); | ||
return getTestScheduler().createTime(marbles.trim()); | ||
} | ||
@@ -26,3 +26,3 @@ /* | ||
frame: scheduler.frame - outerFrame, | ||
notification: Notification.createNext(value), | ||
notification: Notification.createNext(value) | ||
}); | ||
@@ -32,3 +32,3 @@ }, function (err) { | ||
frame: scheduler.frame - outerFrame, | ||
notification: Notification.createError(err), | ||
notification: Notification.createError(err) | ||
}); | ||
@@ -38,3 +38,3 @@ }, function () { | ||
frame: scheduler.frame - outerFrame, | ||
notification: Notification.createComplete(), | ||
notification: Notification.createComplete() | ||
}); | ||
@@ -54,3 +54,3 @@ }); | ||
return { pass: true }; | ||
}, | ||
} | ||
}); }, | ||
@@ -71,3 +71,3 @@ toBeObservable: function () { return ({ | ||
frame: scheduler.frame, | ||
notification: Notification.createNext(value), | ||
notification: Notification.createNext(value) | ||
}); | ||
@@ -77,3 +77,3 @@ }, function (err) { | ||
frame: scheduler.frame, | ||
notification: Notification.createError(err), | ||
notification: Notification.createError(err) | ||
}); | ||
@@ -83,3 +83,3 @@ }, function () { | ||
frame: scheduler.frame, | ||
notification: Notification.createComplete(), | ||
notification: Notification.createComplete() | ||
}); | ||
@@ -92,4 +92,4 @@ }); | ||
return { pass: true }; | ||
}, | ||
}); }, | ||
} | ||
}); } | ||
}); | ||
@@ -96,0 +96,0 @@ } |
@@ -204,3 +204,3 @@ /** | ||
*/ | ||
import * as _ from 'lodash'; | ||
import { isEqual } from 'lodash'; | ||
function stringify(x) { | ||
@@ -238,3 +238,3 @@ return JSON.stringify(x, function (key, value) { | ||
expected = expected.map(deleteErrorNotificationStack); | ||
var passed = _.isEqual(actual, expected); | ||
var passed = isEqual(actual, expected); | ||
if (passed) { | ||
@@ -241,0 +241,0 @@ return; |
@@ -13,3 +13,9 @@ import { TestColdObservable, TestHotObservable } from './src/test-observables'; | ||
} | ||
namespace jest { | ||
interface Matchers<T> { | ||
toBeObservable: any; | ||
toHaveSubscriptions: any; | ||
} | ||
} | ||
} | ||
export declare function addMatchers(): void; |
24
index.js
@@ -12,11 +12,11 @@ "use strict"; | ||
function hot(marbles, values, error) { | ||
return new test_observables_1.TestHotObservable(marbles, values, error); | ||
return new test_observables_1.TestHotObservable(marbles.trim(), values, error); | ||
} | ||
exports.hot = hot; | ||
function cold(marbles, values, error) { | ||
return new test_observables_1.TestColdObservable(marbles, values, error); | ||
return new test_observables_1.TestColdObservable(marbles.trim(), values, error); | ||
} | ||
exports.cold = cold; | ||
function time(marbles) { | ||
return scheduler_1.getTestScheduler().createTime(marbles); | ||
return scheduler_1.getTestScheduler().createTime(marbles.trim()); | ||
} | ||
@@ -35,3 +35,3 @@ exports.time = time; | ||
frame: scheduler.frame - outerFrame, | ||
notification: rxjs_1.Notification.createNext(value), | ||
notification: rxjs_1.Notification.createNext(value) | ||
}); | ||
@@ -41,3 +41,3 @@ }, function (err) { | ||
frame: scheduler.frame - outerFrame, | ||
notification: rxjs_1.Notification.createError(err), | ||
notification: rxjs_1.Notification.createError(err) | ||
}); | ||
@@ -47,3 +47,3 @@ }, function () { | ||
frame: scheduler.frame - outerFrame, | ||
notification: rxjs_1.Notification.createComplete(), | ||
notification: rxjs_1.Notification.createComplete() | ||
}); | ||
@@ -63,3 +63,3 @@ }); | ||
return { pass: true }; | ||
}, | ||
} | ||
}); }, | ||
@@ -80,3 +80,3 @@ toBeObservable: function () { return ({ | ||
frame: scheduler.frame, | ||
notification: rxjs_1.Notification.createNext(value), | ||
notification: rxjs_1.Notification.createNext(value) | ||
}); | ||
@@ -86,3 +86,3 @@ }, function (err) { | ||
frame: scheduler.frame, | ||
notification: rxjs_1.Notification.createError(err), | ||
notification: rxjs_1.Notification.createError(err) | ||
}); | ||
@@ -92,3 +92,3 @@ }, function () { | ||
frame: scheduler.frame, | ||
notification: rxjs_1.Notification.createComplete(), | ||
notification: rxjs_1.Notification.createComplete() | ||
}); | ||
@@ -101,4 +101,4 @@ }); | ||
return { pass: true }; | ||
}, | ||
}); }, | ||
} | ||
}); } | ||
}); | ||
@@ -105,0 +105,0 @@ } |
{ | ||
"name": "jasmine-marbles", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"module": "index.js", | ||
@@ -52,3 +52,3 @@ "es2015": "es6/index.js", | ||
"peerDependencies": { | ||
"rxjs": "^6.0.0-beta.1" | ||
"rxjs": "^6.1.0" | ||
}, | ||
@@ -55,0 +55,0 @@ "dependencies": { |
@@ -9,1 +9,6 @@ # jasmine-marbles | ||
* [Providing Mock Actions for testing ngrx Actions with jasmine-marbles](https://github.com/ngrx/platform/blob/master/docs/effects/testing.md "ngrx Documentation") | ||
# Supported RxJS versions | ||
* 0.2.0 supports RxJS 5.*.* | ||
* 0.3.* supports RxJS 6.*.* |
@@ -206,3 +206,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var _ = require("lodash"); | ||
var lodash_1 = require("lodash"); | ||
function stringify(x) { | ||
@@ -240,3 +240,3 @@ return JSON.stringify(x, function (key, value) { | ||
expected = expected.map(deleteErrorNotificationStack); | ||
var passed = _.isEqual(actual, expected); | ||
var passed = lodash_1.isEqual(actual, expected); | ||
if (passed) { | ||
@@ -243,0 +243,0 @@ return; |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
114467
1224
14