Skip to content

Commit

Permalink
fix: user traits unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykLucka committed Feb 19, 2025
1 parent ec527f2 commit 82fdb5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/scripts/controllers/metametrics-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,7 @@ describe('MetaMetricsController', function () {
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
custodyAccountDetails: {},
///: END:ONLY_INCLUDE_IF
keyrings: [],
});

expect(traits).toStrictEqual({
Expand All @@ -1476,6 +1477,7 @@ describe('MetaMetricsController', function () {
[MetaMetricsUserTrait.NumberOfNftCollections]: 3,
[MetaMetricsUserTrait.NumberOfNfts]: 4,
[MetaMetricsUserTrait.NumberOfTokens]: 5,
[MetaMetricsUserTrait.NumberOfHDSRPs]: 0,
[MetaMetricsUserTrait.OpenSeaApiEnabled]: true,
[MetaMetricsUserTrait.ThreeBoxEnabled]: false,
[MetaMetricsUserTrait.Theme]: 'default',
Expand Down Expand Up @@ -1555,6 +1557,7 @@ describe('MetaMetricsController', function () {
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
custodyAccountDetails: {},
///: END:ONLY_INCLUDE_IF
keyrings: [],
});

const updatedTraits = controller._buildUserTraitsObject({
Expand Down Expand Up @@ -1614,6 +1617,7 @@ describe('MetaMetricsController', function () {
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
custodyAccountDetails: {},
///: END:ONLY_INCLUDE_IF
keyrings: [],
});

expect(updatedTraits).toStrictEqual({
Expand Down Expand Up @@ -1681,6 +1685,7 @@ describe('MetaMetricsController', function () {
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
custodyAccountDetails: {},
///: END:ONLY_INCLUDE_IF
keyrings: [],
});

const updatedTraits = controller._buildUserTraitsObject({
Expand Down Expand Up @@ -1730,6 +1735,7 @@ describe('MetaMetricsController', function () {
///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
custodyAccountDetails: {},
///: END:ONLY_INCLUDE_IF
keyrings: [],
});
expect(updatedTraits).toStrictEqual(null);
});
Expand Down

0 comments on commit 82fdb5a

Please sign in to comment.