Skip to content

Commit a1b4f7b

Browse files
committed
fix wallet_createSession handler unit test
1 parent aa3e1cf commit a1b4f7b

File tree

1 file changed

+15
-10
lines changed
  • app/scripts/lib/rpc-method-middleware/handlers/wallet-createSession

1 file changed

+15
-10
lines changed

app/scripts/lib/rpc-method-middleware/handlers/wallet-createSession/handler.test.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -511,18 +511,23 @@ describe('wallet_createSession', () => {
511511
const { handler, sendMetrics } = createMockedHandler();
512512
await handler(baseRequest);
513513

514-
expect(sendMetrics).toHaveBeenCalledWith({
515-
category: 'inpage_provider',
516-
event: 'Dapp Viewed',
517-
properties: {
518-
is_first_visit: true,
519-
number_of_accounts: 3,
520-
number_of_accounts_connected: 4,
514+
expect(sendMetrics).toHaveBeenCalledWith(
515+
{
516+
category: 'inpage_provider',
517+
event: 'Dapp Viewed',
518+
properties: {
519+
is_first_visit: true,
520+
number_of_accounts: 3,
521+
number_of_accounts_connected: 4,
522+
},
523+
referrer: {
524+
url: 'http://test.com',
525+
},
521526
},
522-
referrer: {
523-
url: 'http://test.com',
527+
{
528+
excludeMetaMetricsId: true,
524529
},
525-
});
530+
);
526531
});
527532

528533
it('returns the known sessionProperties and approved session scopes', async () => {

0 commit comments

Comments
 (0)