Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Add integration tests for debug command #5263

Merged
merged 2 commits into from
Jul 8, 2022

Conversation

sukanyaparashar
Copy link
Contributor

This PR includes few integration tests for truffle debug which includes the following scenarios -

  • when runs with --network option with a config file.
  • when runs with --url option -
    1) with a config file.
    2) without a config file (outside a truffle project).

@sukanyaparashar sukanyaparashar marked this pull request as draft July 5, 2022 20:22
@sukanyaparashar sukanyaparashar marked this pull request as ready for review July 5, 2022 20:48
readyPrompt = `debug(${displayHost})>`;
} else {
readyPrompt = `truffle(${displayHost})>`;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Thoughts on writing this as

const readyPrompt = executableCommand === "debug" ? `debug(${displayHost})>` : `truffle(${displayHost})>`;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like your idea of removing if/else and using a ternary instead of that, @lsqproduction. I will change this. Thanks!

Copy link
Contributor

@eggplantzzz eggplantzzz left a comment

Choose a reason for hiding this comment

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

I like it

Copy link
Member

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

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

LGTM! Though, there are some valid feedback/conversations to resolve.

@sukanyaparashar
Copy link
Contributor Author

sukanyaparashar commented Jul 8, 2022

Thanks for the approvals, @cds-amal and @eggplantzzz. I thought @lsqproduction's suggestions make sense. So, I applied those changes and pushed a new commit. Requested for a re-review for clarity.

@@ -54,7 +54,11 @@ module.exports = {
displayHost
} = {}) {
const cmdLine = `${this.getExecString()} ${executableCommand} ${executableArgs}`;
const readyPrompt = `truffle(${displayHost})>`;

const readyPrompt =
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah this looks nicer to me :)

@sukanyaparashar sukanyaparashar merged commit 77c43c2 into develop Jul 8, 2022
@sukanyaparashar sukanyaparashar deleted the add-debug-integration-test branch July 8, 2022 16:56
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.

4 participants