Skip to content

Commit

Permalink
Fix lint, unit and integration tests related to a/b test code
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Sep 19, 2019
1 parent a647b6d commit 983e04b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ function triggerUi () {
* Opens a new browser tab for user confirmation
*/
function triggerUiInNewTab () {
extension.tabs.query({ active: true }, tabs => {
extension.tabs.query({ active: true }, () => {
const tabIdsArray = Object.keys(openMetamaskTabsIDs)
if (tabIdsArray.length) {
extension.tabs.update(parseInt(tabIdsArray[0], 10), { 'active': true }, () => {
Expand Down
3 changes: 3 additions & 0 deletions development/states/confirm-sig-requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"name": "Send Account 4"
}
},
"abTests": {
"fullScreenVsPopup": "control"
},
"cachedBalances": {},
"conversionRate": 1200.88200327,
"conversionDate": 1489013762,
Expand Down
3 changes: 3 additions & 0 deletions development/states/currency-localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"name": "Send Account 4"
}
},
"abTests": {
"fullScreenVsPopup": "control"
},
"cachedBalances": {},
"unapprovedTxs": {},
"conversionRate": 19855,
Expand Down
3 changes: 3 additions & 0 deletions development/states/tx-list-items.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"name": "Send Account 4"
}
},
"abTests": {
"fullScreenVsPopup": "control"
},
"cachedBalances": {},
"currentCurrency": "USD",
"conversionRate": 1200.88200327,
Expand Down
12 changes: 1 addition & 11 deletions test/unit/migrations/037-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,7 @@ describe('migration #37', () => {

migration37.migrate(oldStorage)
.then((newStorage) => {
try {
assert.deepEqual(newStorage.data.ABTestController, {
'fullScreenVsPopup': 'control',
})
} catch (e) {
assert.deepEqual(newStorage.data.ABTestController, {
abTests: {
'fullScreenVsPopup': 'fullScreen',
},
})
}
assert(newStorage.data.ABTestController.abTests.fullScreenVsPopup.match(/control|fullScreen/))
done()
})
.catch(done)
Expand Down

0 comments on commit 983e04b

Please sign in to comment.