@@ -11,7 +11,7 @@ describe('MemoryCache', function () {
1111 cache = new MemoryCache ( ) ;
1212 } ) ;
1313
14- describe ( 'set() ' , function ( ) {
14+ describe ( '# set/#get ' , function ( ) {
1515 it ( 'should set data by keys' , function ( ) {
1616 var data1 = { } ;
1717 var data2 = { } ;
@@ -82,9 +82,16 @@ describe('MemoryCache', function () {
8282
8383 clock . restore ( ) ;
8484 } ) ;
85+
86+ it ( 'should not see data from the other cache' , function ( ) {
87+ var otherCache = new MemoryCache ( ) ;
88+ otherCache . set ( 'key' , 1 ) ;
89+
90+ should . not . exist ( cache . get ( 'key' ) ) ;
91+ } ) ;
8592 } ) ;
8693
87- describe ( 'delete() ' , function ( ) {
94+ describe ( '# delete' , function ( ) {
8895 it ( 'should delete data by key' , function ( ) {
8996 cache . set ( 'key' , 1 ) ;
9097 cache . delete ( 'key' ) ;
@@ -93,7 +100,7 @@ describe('MemoryCache', function () {
93100 } ) ;
94101 } ) ;
95102
96- describe ( 'clear() ' , function ( ) {
103+ describe ( '# clear' , function ( ) {
97104 it ( 'should clear data' , function ( ) {
98105 var clock = sinon . useFakeTimers ( ) ;
99106
@@ -110,11 +117,4 @@ describe('MemoryCache', function () {
110117 clock . restore ( ) ;
111118 } ) ;
112119 } ) ;
113-
114- it ( 'should not see data from the other cache' , function ( ) {
115- var otherCache = new MemoryCache ( ) ;
116- otherCache . set ( 'key' , 1 ) ;
117-
118- should . not . exist ( cache . get ( 'key' ) ) ;
119- } ) ;
120120} ) ;
0 commit comments