From bb17085448401045d9626c4a742f997ddde5eee5 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 4 Jan 2017 10:41:23 -0500 Subject: [PATCH] Test to ensure Cascading does not clear self * test/store/CascadingTest.js: Test that Cascading store does not clear itself. --- test/store/CascadingTest.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/store/CascadingTest.js b/test/store/CascadingTest.js index 737ca76..f50d886 100644 --- a/test/store/CascadingTest.js +++ b/test/store/CascadingTest.js @@ -82,6 +82,20 @@ describe( 'store.Cascading', () => } ); + it( 'does not clear self', () => + { + const sut = Store.use( Sut )(); + const substore = Store(); + + return sut.add( 'foo', substore ) + .then( () => sut.clear() ) + .then( () => { + return expect( sut.get( 'foo' ) ) + .to.eventually.equal( substore ) + } ); + } ); + + [ [ [ true, true, true ], true ], [ [ true, true, false ], false ],