aboutsummaryrefslogtreecommitdiffstats
path: root/mascara
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-07-03 07:36:16 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-07-03 07:36:16 +0800
commit03ff8a7cfa043539a58863aa7496c33167e815b1 (patch)
treec255b5f5734fb26a356f8f6071bdf719c714727b /mascara
parent35d83c478a007831e39d1ae6eb4715312d2809d6 (diff)
downloadtangerine-wallet-browser-03ff8a7cfa043539a58863aa7496c33167e815b1.tar
tangerine-wallet-browser-03ff8a7cfa043539a58863aa7496c33167e815b1.tar.gz
tangerine-wallet-browser-03ff8a7cfa043539a58863aa7496c33167e815b1.tar.bz2
tangerine-wallet-browser-03ff8a7cfa043539a58863aa7496c33167e815b1.tar.lz
tangerine-wallet-browser-03ff8a7cfa043539a58863aa7496c33167e815b1.tar.xz
tangerine-wallet-browser-03ff8a7cfa043539a58863aa7496c33167e815b1.tar.zst
tangerine-wallet-browser-03ff8a7cfa043539a58863aa7496c33167e815b1.zip
fix mascara warnings
Diffstat (limited to 'mascara')
-rw-r--r--mascara/test/helpers.js2
-rw-r--r--mascara/test/test-ui.js2
-rw-r--r--mascara/test/util/mascara-test-helper.js9
3 files changed, 6 insertions, 7 deletions
diff --git a/mascara/test/helpers.js b/mascara/test/helpers.js
index 08a0a9a7f..8fc5c816b 100644
--- a/mascara/test/helpers.js
+++ b/mascara/test/helpers.js
@@ -1,4 +1,4 @@
-function wait (time) {
+export default function wait (time) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
resolve()
diff --git a/mascara/test/test-ui.js b/mascara/test/test-ui.js
index b9bc42dff..16b2c206a 100644
--- a/mascara/test/test-ui.js
+++ b/mascara/test/test-ui.js
@@ -1,5 +1,3 @@
-const Helper = require('./util/mascara-test-helper.js')
-
window.addEventListener('load', () => {
window.METAMASK_SKIP_RELOAD = true
// inject app container
diff --git a/mascara/test/util/mascara-test-helper.js b/mascara/test/util/mascara-test-helper.js
index c40b57300..0439fbba3 100644
--- a/mascara/test/util/mascara-test-helper.js
+++ b/mascara/test/util/mascara-test-helper.js
@@ -2,15 +2,16 @@ const EventEmitter = require('events')
const IDB = require('idb-global')
const KEY = 'metamask-test-config'
module.exports = class Helper extends EventEmitter {
- constructor () {
- super()
- }
tryToCleanContext () {
this.unregister()
.then(() => this.clearDb())
.then(() => super.emit('complete'))
- .catch((err) => super.emit('complete'))
+ .catch((err) => {
+ if (err) {
+ super.emit('complete')
+ }
+ })
}
unregister () {