@@ -501,13 +501,21 @@ describe('store: [adapter=DOMAIN]', () => {
501
501
502
502
globalStore . initialize ( adapter ) ( callback ) ;
503
503
504
+ expect ( globalStore . reset ) . to . not . throw ( 'Async store not initialized.' ) ;
505
+
504
506
globalStore . reset ( ) ;
505
507
506
508
expect ( globalStore . isInitialized ( ) ) . to . equal ( false ) ;
507
509
508
510
const activeDomain = getActiveDomain ( ) ;
509
511
expect ( activeDomain [ STORE_KEY ] ) . to . equal ( null ) ;
510
512
} ) ;
513
+
514
+ it ( 'should do nothing if the store is not initialized.' , ( ) => {
515
+ expect ( globalStore . reset ) . to . throw ( 'Async store not initialized.' ) ;
516
+ } ) ;
517
+
518
+
511
519
} ) ;
512
520
513
521
describe ( 'del():' , ( ) => {
@@ -536,6 +544,7 @@ describe('store: [adapter=DOMAIN]', () => {
536
544
expect ( globalStore . get ( 'foo' ) ) . to . equal ( 'foo' ) ;
537
545
expect ( globalStore . get ( 'bar' ) ) . to . equal ( 'bar' ) ;
538
546
547
+ expect ( globalStore . del . bind ( globalStore , 'baz' ) ) . to . not . throw ( 'Async store not initialized.' ) ;
539
548
globalStore . del ( 'baz' ) ;
540
549
541
550
expect ( globalStore . get ( 'foo' ) ) . to . equal ( 'foo' ) ;
@@ -546,6 +555,10 @@ describe('store: [adapter=DOMAIN]', () => {
546
555
547
556
globalStore . initialize ( adapter ) ( callback ) ;
548
557
} ) ;
558
+
559
+ it ( 'should do nothing if the store is not initialized.' , ( ) => {
560
+ expect ( globalStore . del . bind ( globalStore , 'foo' ) ) . to . throw ( 'Async store not initialized.' ) ;
561
+ } ) ;
549
562
} ) ;
550
563
551
564
describe ( 'Test Cases:' , ( ) => {
0 commit comments