File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,17 @@ module.exports = function testAdapter(options) {
6565 } ) ;
6666 } ) ;
6767
68+ it ( 'should return filtered saves on getAll' , async ( ) => {
69+ await adapter . put ( '/a-key' , { views : [ { time : 1490623474639 } ] } ) ;
70+ await adapter . put ( '/another-key' , { views : [ { time : 1490623474639 } ] } ) ;
71+ await adapter . put ( '/b-key' , { views : [ { time : 1490623474639 } ] } ) ;
72+
73+ expect ( await adapter . getAll ( { pathname : '/a' } ) ) . toEqual ( {
74+ '/a-key' : { views : [ { time : 1490623474639 } ] } ,
75+ '/another-key' : { views : [ { time : 1490623474639 } ] } ,
76+ } ) ;
77+ } ) ;
78+
6879 it ( 'should have check whether a key is stored with has' , async ( ) => {
6980 await adapter . put ( '/a-key' , { views : [ { time : 1490623474639 } ] } ) ;
7081
@@ -73,7 +84,6 @@ module.exports = function testAdapter(options) {
7384 } ) ;
7485
7586 if ( typeof adapter . subscribe === "function" ) {
76-
7787 it ( 'should allow subscription with observables' , async ( ) => {
7888 const listener = jest . fn ( ) ;
7989 const unsubscribe = adapter . subscribe ( listener ) ;
You can’t perform that action at this time.
0 commit comments