Bug 1598997 - Mock profile fetching function in xpcshell tests. r=eoger

Differential Revision: https://phabricator.services.mozilla.com/D54450

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Hammond 2019-11-25 21:21:46 +00:00
parent 3e0cb96b6e
commit 818e5a5c52
2 changed files with 10 additions and 0 deletions

View File

@ -200,6 +200,11 @@ function MockFxAccounts(credentials = null) {
device: {
_registerOrUpdateDevice() {},
},
profile: {
getProfile() {
return null;
},
},
});
// and for convenience so we don't have to touch as many lines in this test
// when we refactored FxAccounts.jsm :)

View File

@ -197,6 +197,11 @@ var makeFxAccountsInternalMock = function(config) {
_getAssertion(audience) {
return Promise.resolve(config.fxaccount.user.assertion);
},
profile: {
getProfile() {
return null;
},
},
};
};