Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2017-01-04 10:41:23 -0500
committerMike Gerwitz <gerwitzm@lovullo.com>2017-01-04 16:17:37 -0500
commitbb17085448401045d9626c4a742f997ddde5eee5 (patch)
tree16dd42455dbe1b1f2f5d12225c9b6a8e00b1ce7f
parent0c18a6321a617365f079d64bb56888e2d98ff145 (diff)
downloadliza-bb17085448401045d9626c4a742f997ddde5eee5.tar.gz
liza-bb17085448401045d9626c4a742f997ddde5eee5.tar.bz2
liza-bb17085448401045d9626c4a742f997ddde5eee5.zip
Test to ensure Cascading does not clear self
* test/store/CascadingTest.js: Test that Cascading store does not clear itself.
-rw-r--r--test/store/CascadingTest.js14
1 files changed, 14 insertions, 0 deletions
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 ],