aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/metamask-controller-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/metamask-controller-test.js')
-rw-r--r--test/unit/metamask-controller-test.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/unit/metamask-controller-test.js b/test/unit/metamask-controller-test.js
new file mode 100644
index 000000000..78b9e9df7
--- /dev/null
+++ b/test/unit/metamask-controller-test.js
@@ -0,0 +1,29 @@
+const assert = require('assert')
+const sinon = require('sinon')
+const clone = require('clone')
+const MetaMaskController = require('../../app/scripts/metamask-controller')
+const firstTimeState = require('../../app/scripts/first-time-state')
+
+const STORAGE_KEY = 'metamask-config'
+
+describe('MetaMaskController', function() {
+ const noop = () => {}
+ let controller = new MetaMaskController({
+ showUnconfirmedMessage: noop,
+ unlockAccountMessage: noop,
+ showUnapprovedTx: noop,
+ // initial state
+ initState: clone(firstTimeState),
+ })
+
+ beforeEach(function() {
+ // sinon allows stubbing methods that are easily verified
+ this.sinon = sinon.sandbox.create()
+ })
+
+ afterEach(function() {
+ // sinon requires cleanup otherwise it will overwrite context
+ this.sinon.restore()
+ })
+
+}) \ No newline at end of file