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

Formatting #913

Closed
wants to merge 16 commits into from
4 changes: 2 additions & 2 deletions test/app/App/Panel/AddToken/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('token metadata lookup', () => {
expect(tokenDecimalsInput.value).toEqual('18')
expect(tokenChainSelect.textContent).toEqual('Mainnet')
})
}, 1000)
}, 2000)
Copy link
Collaborator

Choose a reason for hiding this comment

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

are these tests regularly taking longer than 1 second? seems like something we should address as no individual unit test should be taking anywhere near this long

Copy link
Collaborator

Choose a reason for hiding this comment

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

also please try not to pile a bunch of unrelated changes into one PR, better to make them separate PRs so we can track changes more clearly going forward

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll probably need to ditch all the non-config changes and recreate the PR when it is time to merge anyway; the formatting changes in this PR are just to show what the formatted code would look like with these settings.

Copy link
Contributor Author

@goosewobbler goosewobbler Jul 4, 2022

Choose a reason for hiding this comment

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

When the tests run on every push, you know pretty quickly if they are flaky. I should have forced husky pre-push not to run rather than commit more changes. However, as mentioned above I am not expecting this will be merged, better to take the config changes and reapply formatting to create a new PR when we are ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Marked as draft to make the above more obvious


describe('when the chain id is changed', () => {
it('should perform a lookup and display the expected token data', async () => {
Expand Down Expand Up @@ -109,6 +109,6 @@ describe('token metadata lookup', () => {
expect(tokenDecimalsInput.value).toEqual('18')
expect(tokenChainSelect.textContent).toEqual('Polygon')
})
}, 1000)
}, 2000)
})
})
2 changes: 1 addition & 1 deletion test/main/chains/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,5 @@ Object.values(mockConnections).forEach((chain) => {
})

store.toggleConnection('ethereum', chain.id, 'primary', true)
})
}, 500)
})
6 changes: 3 additions & 3 deletions test/main/signers/hot/RingSigner/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('Ring signer', () => {
hot.scan(signers)

jest.runAllTimers()
}, 800)
}, 1000)

test('Close signer', (done) => {
try {
Expand Down Expand Up @@ -204,7 +204,7 @@ describe('Ring signer', () => {
} catch (e) {
done(e)
}
}, 500)
}, 1000)

test('Unlock', (done) => {
try {
Expand All @@ -215,7 +215,7 @@ describe('Ring signer', () => {
} catch (e) {
done(e)
}
}, 500)
}, 2000)

test('Sign message', (done) => {
try {
Expand Down
6 changes: 3 additions & 3 deletions test/main/signers/hot/SeedSigner/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('Seed signer', () => {
} catch (e) {
done(e)
}
}, 2000)
}, 2500)

test('Scan for signers', (done) => {
jest.useFakeTimers()
Expand All @@ -92,7 +92,7 @@ describe('Seed signer', () => {
hot.scan(signers)

jest.runAllTimers()
}, 800)
}, 1000)

test('Unlock with wrong password', (done) => {
try {
Expand All @@ -115,7 +115,7 @@ describe('Seed signer', () => {
} catch (e) {
done(e)
}
}, 400)
}, 500)

test('Sign message', (done) => {
try {
Expand Down