@reactive-js/rx
Advanced tools
Comparing version 0.0.9 to 0.0.10
{ | ||
"name": "@reactive-js/rx", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"main": "dist/cjs/index.js", | ||
@@ -41,8 +41,8 @@ "module": "dist/esm5/index.js", | ||
"dependencies": { | ||
"@reactive-js/disposable": "^0.0.9", | ||
"@reactive-js/scheduler": "^0.0.9" | ||
"@reactive-js/disposable": "^0.0.10", | ||
"@reactive-js/scheduler": "^0.0.10" | ||
}, | ||
"devDependencies": { | ||
"@reactive-js/pipe": "^0.0.9", | ||
"@reactive-js/schedulers": "^0.0.9", | ||
"@reactive-js/pipe": "^0.0.10", | ||
"@reactive-js/schedulers": "^0.0.10", | ||
"@types/jest": "^24.0.23", | ||
@@ -72,3 +72,3 @@ "jest": "^24.9.0", | ||
}, | ||
"gitHead": "24008ff071cc86dfb1eaf3940996e6feb8e69704" | ||
"gitHead": "fef42eb9cbce4260e80cf397f7fbd2a3bf3311d5" | ||
} |
@@ -110,2 +110,4 @@ import { | ||
subject.subscribe(subscriber); | ||
expect(subject.subscriberCount).toEqual(0); | ||
scheduler.run(); | ||
@@ -116,2 +118,3 @@ | ||
}); | ||
test("when subject is not completed", () => { | ||
@@ -131,2 +134,4 @@ const subject = createSubject(2); | ||
}); | ||
expect(subject.subscriberCount).toEqual(1); | ||
scheduler.run(); | ||
@@ -149,9 +154,41 @@ | ||
const subscriber = new MockSubscriber(scheduler); | ||
subject.subscribe(subscriber); | ||
expect(subject.subscriberCount).toEqual(1); | ||
subscriber.dispose(); | ||
expect(subject.subscriberCount).toEqual(0); | ||
scheduler.run(); | ||
expect(subscriber.isDisposed).toBeTruthy(); | ||
expect(subscriber.next).toHaveBeenCalledTimes(0); | ||
}); | ||
test("disposed subject ignores notifications", () => { | ||
const subject = createSubject(2); | ||
const scheduler = createVirtualTimeSchedulerResource(); | ||
const subscriber = new MockSubscriber(scheduler); | ||
subject.subscribe(subscriber); | ||
expect(subject.isDisposed).toBeFalsy(); | ||
subject.dispose(); | ||
expect(subject.isDisposed).toBeTruthy(); | ||
subject.next(1); | ||
subject.complete(); | ||
expect(subscriber.next).toHaveBeenCalledTimes(0); | ||
expect(subscriber.complete).toHaveBeenCalledTimes(0); | ||
}); | ||
test("disposes subscriber if disposed", () => { | ||
const subject = createSubject(2); | ||
const scheduler = createVirtualTimeSchedulerResource(); | ||
const subscriber = new MockSubscriber(scheduler); | ||
subject.dispose(); | ||
subject.subscribe(subscriber); | ||
expect(subscriber.isDisposed).toBeTruthy(); | ||
}); | ||
}); | ||
}); |
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
604616
114
2132
+ Added@reactive-js/disposable@0.0.10(transitive)
+ Added@reactive-js/scheduler@0.0.10(transitive)
- Removed@reactive-js/disposable@0.0.9(transitive)
- Removed@reactive-js/scheduler@0.0.9(transitive)