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 ],