Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue jestifying tests #11026

Closed
wants to merge 6 commits into from
Closed

Continue jestifying tests #11026

wants to merge 6 commits into from

Conversation

tmashuang
Copy link
Contributor

Ommited

'**/unit-global/*.test.js',
'app/scripts/metamask-controller.test.js',
'app/scripts/controllers/transactions/index.test.js',
'app/scripts/controllers/network/pending-middleware.test.js',
'app/scripts/controllers/permissions/permissions-middleware.test.js',

due to a issues with the ganache server instance, poorly written, and general compatibility with jest. Most likely will have to rethink/rewrite these from the ground up.

Pinned jest-enviornment-jsdom to 25 for Uint8Array Buffer issue in jest <= 26, jestjs/jest#7780

@tmashuang tmashuang requested a review from a team as a code owner May 10, 2021 15:45
@tmashuang tmashuang requested a review from darkwing May 10, 2021 15:45
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

darkwing
darkwing previously approved these changes May 20, 2021
Copy link
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks really modern and improved -- just a few comments!

entry3.response === null,
'all entries should be in correct order and without responses',
);
// expect(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this?

EXPECTED_HISTORIES.case1[1],
'should have correct history',
);
expect(permHistory).toStrictEqual(EXPECTED_HISTORIES.case1[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to miss comments like 'should have correct history'?

@metamaskbot
Copy link
Collaborator

Builds ready [f909ef2]
Page Load Metrics (664 ± 48 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint448161105
domContentLoaded500100666210048
load501100766410048
domInteractive499100566210048

@SirJosh1987

This comment has been minimized.

@SirJosh1987

This comment has been minimized.

Copy link
Contributor

@dan437 dan437 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job switching tests many more tests to Jest, I believe it's a great improvement! I have left just one comment for a nice-to-have improvement, otherwise it looks good to me (assuming conflicts are resolved) 🟢

@@ -1,5 +1,5 @@
/* eslint-disable jest/no-conditional-expect */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we set this ESLint rule globally instead of having it in individual files?

@tmashuang tmashuang closed this Sep 15, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants