File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,16 @@ const sander = require('sander')
12
12
const os = require ( 'os' )
13
13
const storagePath = path . join ( os . tmpdir ( ) , 'test/find-storage' )
14
14
15
+ let storageContext
16
+
15
17
beforeEach ( ( ) => {
16
- t . context . storage = TestDummy . dummyStorage ( storagePath )
17
- localStorage . setItem ( 'storages' , JSON . stringify ( [ t . context . storage . cache ] ) )
18
+ storageContext = TestDummy . dummyStorage ( storagePath )
19
+ localStorage . setItem ( 'storages' , JSON . stringify ( [ storageContext . cache ] ) )
18
20
} )
19
21
20
22
// Unit test
21
23
test ( 'findStorage() should return a correct storage path(string)' , ( ) => {
22
- const storageKey = t . context . storage . cache . key
24
+ const storageKey = storageContext . cache . key
23
25
24
26
expect ( findStorage ( storageKey ) . key ) . toBe ( storageKey )
25
27
expect ( findStorage ( storageKey ) . path ) . toBe ( storagePath )
You can’t perform that action at this time.
0 commit comments