test - clear localStorage on test start

feature/default_network_editable
kumavis 8 years ago
parent 91e5cc0f29
commit 85634326e8
  1. 6
      test/unit/notice-controller-test.js

@ -5,14 +5,14 @@ const nock = require('nock')
const configManagerGen = require('../lib/mock-config-manager') const configManagerGen = require('../lib/mock-config-manager')
const NoticeController = require('../../app/scripts/notice-controller') const NoticeController = require('../../app/scripts/notice-controller')
const STORAGE_KEY = 'metamask-persistance-key' const STORAGE_KEY = 'metamask-persistance-key'
// Hacking localStorage support into JSDom
if (window.localStorage) window.localStorage.clear()
window.localStorage = {}
describe('notice-controller', function() { describe('notice-controller', function() {
var noticeController var noticeController
beforeEach(function() { beforeEach(function() {
// simple localStorage polyfill
window.localStorage = {}
if (window.localStorage.clear) window.localStorage.clear()
let configManager = configManagerGen() let configManager = configManagerGen()
noticeController = new NoticeController({ noticeController = new NoticeController({
configManager: configManager, configManager: configManager,

Loading…
Cancel
Save