-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from Chemaclass/feat/add-debug-option
Add debug option
- Loading branch information
Showing
6 changed files
with
27 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
|
||
## bashunit | ||
curl -s https://bashunit.typeddevs.com/install.sh | bash -s lib beta | ||
curl -s https://bashunit.typeddevs.com/install.sh | bash -s lib 0.16.0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#!/bin/bash | ||
|
||
function set_up() { | ||
export REMOTE_URL="[email protected]:Chemaclass/create-pr.sh.git" | ||
export APP_CREATE_PR_ROOT_DIR=. | ||
export REMOTE_URL="[email protected]:Chemaclass/create-pr.sh.git" | ||
export BASE_BRANCH="main" | ||
export BRANCH_NAME="feat/ticket-123-my_branch-name" | ||
export PR_TEMPLATE_PATH=".github/PULL_REQUEST_TEMPLATE.md" | ||
|
@@ -14,22 +14,16 @@ function set_up() { | |
SCRIPT="$CREATE_PR_ROOT_DIR/create-pr.sh" | ||
} | ||
|
||
function tear_down_after_script() { | ||
export DEBUG=false | ||
} | ||
|
||
function test_success() { | ||
spy git | ||
spy gh | ||
export DEBUG=false | ||
|
||
assert_match_snapshot "$($SCRIPT)" | ||
} | ||
|
||
function test_debug_success() { | ||
function test_script_with_debug() { | ||
spy git | ||
spy gh | ||
export DEBUG=true | ||
|
||
assert_match_snapshot "$($SCRIPT)" | ||
assert_match_snapshot "$($SCRIPT --debug)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
[[33mDUMP[0m] [32m./create-pr.sh:57: [0mREMOTE_URL: [email protected]:Chemaclass/create-pr.sh.git | ||
[[33mDUMP[0m] [32m./create-pr.sh:58: [0mPR_USING_CLIENT: github | ||
[[33mDUMP[0m] [32m./create-pr.sh:59: [0mBRANCH_NAME: feat/ticket-123-my_branch-name | ||
[[33mDUMP[0m] [32m./create-pr.sh:60: [0mPR_TEMPLATE: ./.github/PULL_REQUEST_TEMPLATE.md | ||
[[33mDUMP[0m] [32m./create-pr.sh:61: [0mPR_LABEL: enhancement | ||
[[33mDUMP[0m] [32m./create-pr.sh:62: [0mPR_TITLE: TICKET-123 My branch name | ||
[[33mDUMP[0m] [32m./create-pr.sh:63: [0mPR_BODY: ### 🔗 Ticket | ||
[[33mDUMP[0m] [32m./create-pr.sh:55: [0mREMOTE_URL: [email protected]:Chemaclass/create-pr.sh.git | ||
[[33mDUMP[0m] [32m./create-pr.sh:56: [0mBRANCH_NAME: feat/ticket-123-my_branch-name | ||
[[33mDUMP[0m] [32m./create-pr.sh:57: [0mPR_USING_CLIENT: github | ||
[[33mDUMP[0m] [32m./create-pr.sh:58: [0mPR_TEMPLATE: ./.github/PULL_REQUEST_TEMPLATE.md | ||
[[33mDUMP[0m] [32m./create-pr.sh:59: [0mPR_LABEL: enhancement | ||
[[33mDUMP[0m] [32m./create-pr.sh:60: [0mPR_TITLE: TICKET-123 My branch name | ||
[[33mDUMP[0m] [32m./create-pr.sh:61: [0mPR_BODY: ### 🔗 Ticket | ||
|
||
Closes: https://github.com/Chemaclass/create-pr.sh/issues/TICKET-123 | ||
|
||
|
@@ -27,4 +27,3 @@ Details in the ticket. | |
#### BEFORE | ||
|
||
#### AFTER | ||
Script finished successfully. |