aboutsummaryrefslogtreecommitdiff
path: root/test/segments/nodeenv.spec
diff options
context:
space:
mode:
Diffstat (limited to 'test/segments/nodeenv.spec')
-rwxr-xr-xtest/segments/nodeenv.spec24
1 files changed, 2 insertions, 22 deletions
diff --git a/test/segments/nodeenv.spec b/test/segments/nodeenv.spec
index 2e9d779e..92de81f5 100755
--- a/test/segments/nodeenv.spec
+++ b/test/segments/nodeenv.spec
@@ -44,26 +44,6 @@ function testNodeenvSegmentPrintsNothingIfNodeVirtualEnvIsNotSet() {
unfunction node
}
-function testNodeenvSegmentPrintsNothingIfNodeVirtualEnvDisablePromptIsSet() {
- local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
- POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nodeenv custom_world)
- local POWERLEVEL9K_CUSTOM_WORLD='echo world'
- node() {
- echo "v1.2.3"
- }
- NODE_VIRTUAL_ENV="node-env"
- NODE_VIRTUAL_ENV_DISABLE_PROMPT=true
-
- # Load Powerlevel9k
- source powerlevel9k.zsh-theme
-
- assertEquals "%K{007} %F{000}world %k%F{007}%f " "$(build_left_prompt)"
-
- unset NODE_VIRTUAL_ENV_DISABLE_PROMPT
- unset NODE_VIRTUAL_ENV
- unfunction node
-}
-
function testNodeenvSegmentPrintsAtLeastNodeEnvWithoutNode() {
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(nodeenv)
@@ -73,7 +53,7 @@ function testNodeenvSegmentPrintsAtLeastNodeEnvWithoutNode() {
# Load Powerlevel9k
source powerlevel9k.zsh-theme
- assertEquals "%K{000} %F{002}⬢ %f%F{002}[node-env] %k%F{000}%f " "$(build_left_prompt)"
+ assertEquals "%K{000} %F{002}⬢ %F{002}[node-env] %k%F{000}%f " "$(build_left_prompt)"
unset NODE_VIRTUAL_ENV
unalias node
@@ -90,7 +70,7 @@ function testNodeenvSegmentWorks() {
# Load Powerlevel9k
source powerlevel9k.zsh-theme
- assertEquals "%K{000} %F{002}⬢ %f%F{002}v1.2.3[node-env] %k%F{000}%f " "$(build_left_prompt)"
+ assertEquals "%K{000} %F{002}⬢ %F{002}v1.2.3[node-env] %k%F{000}%f " "$(build_left_prompt)"
unfunction node
unset NODE_VIRTUAL_ENV