diff options
Diffstat (limited to 'packages/demobank-ui/mocks')
-rw-r--r-- | packages/demobank-ui/mocks/json-server/db.json | 4 | ||||
-rw-r--r-- | packages/demobank-ui/mocks/window.js | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/packages/demobank-ui/mocks/json-server/db.json b/packages/demobank-ui/mocks/json-server/db.json new file mode 100644 index 000000000..44d3ccab2 --- /dev/null +++ b/packages/demobank-ui/mocks/json-server/db.json @@ -0,0 +1,4 @@ +{ + "register": {}, + "transactions": {} +} diff --git a/packages/demobank-ui/mocks/window.js b/packages/demobank-ui/mocks/window.js new file mode 100644 index 000000000..f396ff9e3 --- /dev/null +++ b/packages/demobank-ui/mocks/window.js @@ -0,0 +1,27 @@ +Object.defineProperty(window, 'requestAnimationFrame', { + value: function(cb) {} // Silence the browser. +}) + +Object.defineProperty(window, 'localStorage', { + value: { + store: {}, + getItem: function(key) { + return this.store[key]; + }, + setItem: function(key, value) { + return this.store[key] = value; + }, + clear: function() { + this.store = {}; + } + } +}); +Object.defineProperty(window, 'location', { + value: { + origin: "http://localhost:8080", /* where taler-local rev proxy listens to */ + search: "", + pathname: "/sandbox/demobanks/default", + } +}) + +export default window; |