Skip to content

Commit

Permalink
Update getMultiAccountBalancesEnabled specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiexi committed Dec 4, 2023
1 parent f4a814f commit af38a0f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/assets-controllers/src/AccountTrackerController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ describe('AccountTrackerController', () => {
});

it('should update only selected address balance when multi-account is disabled', async () => {
mockedQuery.mockReturnValueOnce(Promise.resolve('0x10'));
mockedQuery
.mockReturnValueOnce(Promise.resolve('0x10'))
.mockReturnValueOnce(Promise.resolve('0x11'));

const controller = new AccountTrackerController(
{
Expand Down Expand Up @@ -221,8 +223,9 @@ describe('AccountTrackerController', () => {
});

it('should update all address balances when multi-account is enabled', async () => {
mockedQuery.mockReturnValueOnce(Promise.resolve('0x11'));
mockedQuery.mockReturnValueOnce(Promise.resolve('0x12'));
mockedQuery
.mockReturnValueOnce(Promise.resolve('0x11'))
.mockReturnValueOnce(Promise.resolve('0x12'));

const controller = new AccountTrackerController(
{
Expand Down Expand Up @@ -363,7 +366,9 @@ describe('AccountTrackerController', () => {
});

it('should update only selected address balance when multi-account is disabled', async () => {
mockedQuery.mockReturnValueOnce(Promise.resolve('0x10'));
mockedQuery
.mockReturnValueOnce(Promise.resolve('0x10'))
.mockReturnValueOnce(Promise.resolve('0x11'));

const controller = new AccountTrackerController({
onPreferencesStateChange: sinon.stub(),
Expand Down Expand Up @@ -405,8 +410,9 @@ describe('AccountTrackerController', () => {
});

it('should update all address balances when multi-account is enabled', async () => {
mockedQuery.mockReturnValueOnce(Promise.resolve('0x11'));
mockedQuery.mockReturnValueOnce(Promise.resolve('0x12'));
mockedQuery
.mockReturnValueOnce(Promise.resolve('0x11'))
.mockReturnValueOnce(Promise.resolve('0x12'));

const controller = new AccountTrackerController({
onPreferencesStateChange: sinon.stub(),
Expand Down

0 comments on commit af38a0f

Please sign in to comment.