Move ganache server from setup file to individual test suites#9703
Move ganache server from setup file to individual test suites#9703
Conversation
|
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. |
Gudahtt
left a comment
There was a problem hiding this comment.
This is a fantastic idea 👍 Thanks!
Curious error 🤔 I might spend some time looking into it soon.
|
I have suspected some of the other flaky unit test behaviour we've seen was caused by tests running after mocha thinks they're finished. Either that or the code under test keeps running. I bet this is caused by the same thing. My plan was going to be to remove the |
|
This error appears to be caused by I suspect that the code-under-test in this test suite keeps running long after the tests end, and it blows up when These tests are not great 😬. Ultimately we should be using mocks for each of these actions, instead of a real instance of the MetaMask background controller. We might have to go through these action tests one-by-one and replace the use of this controller with mocks. |
|
Oops - I clicked "Close and comment" by accident instead of "Comment". |
|
Dependent on #10321 as per the latest comment. |
0df50e6 to
030a633
Compare
Builds ready [030a633]
Page Load Metrics (569 ± 13 ms)
|
030a633 to
a7ea3dd
Compare
Builds ready [a7ea3dd]
Page Load Metrics (579 ± 27 ms)
|
Jest setup files run on each individual test file/suite. This moves the Ganache out of the test setup files and into the tests that Ganache is used.
One issue is at the end of the unit test output. there is an error from Ganache that I am unfamiliar with how to handle.
Strikethough no longer valid now that #10331 has been merged.Error output screenshot