Skip to content

Commit

Permalink
Add failing test case for #249
Browse files Browse the repository at this point in the history
Subscribing to a circular dep should cause everything to
deactivate but doesn't.
  • Loading branch information
mAAdhaTTah committed Oct 25, 2017
1 parent 6b0945a commit be14d0f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/specs/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ describe('pool', () => {
})
})

it('should deactivate self in circular dependency', () => {
const pool = Kefir.pool()
pool.plug(pool.map(x => x))

const sub = pool.observe()

expect(pool).toBeActive()

sub.unsubscribe()

expect(pool).not.toBeActive()
})

it('errors should flow', () => {
const a = stream()
const b = prop()
Expand Down

0 comments on commit be14d0f

Please sign in to comment.