Skip to content

Commit

Permalink
chore: add NO_COLOR= bash tests (#41)
Browse files Browse the repository at this point in the history
* chore: bump `uvu` version

* chore: add `NO_COLOR` bash tests
  • Loading branch information
lukeed authored Sep 26, 2020
1 parent ef5d4a8 commit b329629
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
],
"devDependencies": {
"esm": "3.2.25",
"uvu": "0.0.16"
"uvu": "0.3.3"
}
}
5 changes: 5 additions & 0 deletions test/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ nocolor `NODE_DISABLE_COLORS=1 node -p "require('.').red('foo')"` "NODE_DISABLE_
nocolor `NODE_DISABLE_COLORS=1 FORCE_COLOR=1 node -p "require('.').red('foo')"` "NODE_DISABLE_COLORS=1; FORCE_COLOR=1"
nocolor `NO_COLOR=1 node -p "require('.').red('foo')"` "NO_COLOR=1"
nocolor `NO_COLOR=1 FORCE_COLOR=1 node -p "require('.').red('foo')"` "NO_COLOR=1; FORCE_COLOR=1"
nocolor `NO_COLOR= FORCE_COLOR=1 node -p "require('.').red('foo')"` "NO_COLOR=; FORCE_COLOR=1"
colors `FORCE_COLOR=1 node -p "require('.').red('foo')"` "FORCE_COLOR=1"
colors `FORCE_COLOR= node -p "require('.').red('foo')"` "FORCE_COLOR="
nocolor `TERM=dumb FORCE_COLOR=1 node -p "require('.').red('foo')"` "TERM=dumb; FORCE_COLOR=1"
nocolor `TERM=dumb node -p "require('.').red('foo')"` "TERM=dumb"

Expand All @@ -40,8 +42,11 @@ nocolor `NODE_DISABLE_COLORS=1 faketty node -p "require('.').red('foo')"` "NODE_
nocolor `NODE_DISABLE_COLORS=1 FORCE_COLOR=1 faketty node -p "require('.').red('foo')"` "NODE_DISABLE_COLORS=1; FORCE_COLOR=1"
nocolor `NO_COLOR=1 faketty node -p "require('.').red('foo')"` "NO_COLOR=1"
nocolor `NO_COLOR=1 FORCE_COLOR=1 faketty node -p "require('.').red('foo')"` "NO_COLOR=1; FORCE_COLOR=1"
nocolor `NO_COLOR= faketty node -p "require('.').red('foo')"` "NO_COLOR="
nocolor `NO_COLOR= FORCE_COLOR=1 faketty node -p "require('.').red('foo')"` "NO_COLOR=; FORCE_COLOR=1"
nocolor `TERM=dumb FORCE_COLOR=1 faketty node -p "require('.').red('foo')"` "TERM=dumb; FORCE_COLOR=1"
colors `FORCE_COLOR=1 faketty node -p "require('.').red('foo')"` "FORCE_COLOR=1"
colors `FORCE_COLOR= faketty node -p "require('.').red('foo')"` "FORCE_COLOR="
nocolor `TERM=dumb node -r esm test/xyz.js` "TERM=dumb"

if [ "$code" == "0" ]; then
Expand Down

0 comments on commit b329629

Please sign in to comment.