Skip to content

test: add integration test for generateWallet#212

Open
pranishnepal wants to merge 1 commit into
masterfrom
WAL-1502
Open

test: add integration test for generateWallet#212
pranishnepal wants to merge 1 commit into
masterfrom
WAL-1502

Conversation

@pranishnepal
Copy link
Copy Markdown
Contributor

What

This PR adds an integration test for the generateWallet endpoint, which is responsible for generating a new wallet with the provided parameters. The test verifies that the endpoint correctly generates keys
using the key provider and creates a wallet on BitGo with the expected
properties -- tests cover both local and external key generation modes.

Ticket: WAL-1502

Testing

npm run test:integration
Screenshot 2026-05-29 at 4 15 32 PM

npm run docker:test:integration
Screenshot 2026-05-29 at 4 15 02 PM


Next Steps

Add the test to CI & Add test for other flows

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 29, 2026

WAL-1502

@pranishnepal pranishnepal marked this pull request as ready for review May 29, 2026 20:37
@pranishnepal pranishnepal requested a review from a team as a code owner May 29, 2026 20:37
@pranishnepal pranishnepal requested a review from bdesoky May 29, 2026 20:37
return new Promise((resolve, reject) => {
server.once('error', reject);
server.listen(0, '127.0.0.1', () => {
server.listen(0, LOCALHOST, () => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

0 here means use whatever port is available!

);

res.status.should.equal(200);
const body = (await res.json()) as any;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

small nit: can we use a better type than any here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, good point -- there was no exported type and since this was test, i just let it be any, but i added it now. Thank you!

bdesoky
bdesoky previously approved these changes May 29, 2026
Copy link
Copy Markdown

@bdesoky bdesoky left a comment

Choose a reason for hiding this comment

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

looks good

This PR adds an integration test for the generateWallet endpoint,
which is responsible for generating a new wallet with the provided
parameters. The test verifies that the endpoint correctly generates keys
 using the key provider and creates a wallet on BitGo with the expected
properties -- tests cover both local and external key generation modes.

Ticket: WAL-1502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants