diff options
Diffstat (limited to 'src/js/tests/mock-storage.js')
-rw-r--r-- | src/js/tests/mock-storage.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/js/tests/mock-storage.js b/src/js/tests/mock-storage.js new file mode 100644 index 0000000..71c667f --- /dev/null +++ b/src/js/tests/mock-storage.js @@ -0,0 +1,20 @@ + +var MockStorage = function() { + this.store = {}; +}; + +_.extend(MockStorage.prototype, { + + getItem: function(key) { + return this.store[key]; + }, + + setItem: function(key,value) { + this.store[key] = value; + }, + + removeItem: function(key,value) { + delete this.store[key]; + }, + +}); |