Skip to content

Commit

Permalink
BATS: Replace using_npm_run_dev with using_dev_mode
Browse files Browse the repository at this point in the history
BATS: Update `using_dev` to `using_dev_mode`

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
  • Loading branch information
rak-phillip committed Jul 17, 2023
1 parent e15a55f commit 8ed1104
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions bats/tests/helpers/defaults.bash
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ validate_enum RD_9P_SECURITY_MODEL passthrough mapped-xattr mapped-file none
# system: default system-wide install location shared for all users
# user: per-user install location
# dist: use the result of `yarn package` in ../dist
# npm: dev mode; start app with `cd ..; yarn dev`
# dev: dev mode; start app with `cd ..; yarn dev`
# "": use first location from the list above that contains the app

: "${RD_LOCATION:=}"

validate_enum RD_LOCATION system user dist npm ""
validate_enum RD_LOCATION system user dist dev ""

using_npm_run_dev() {
[ "$RD_LOCATION" = "npm" ]
using_dev_mode() {
[ "$RD_LOCATION" = "dev" ]
}
2 changes: 1 addition & 1 deletion bats/tests/helpers/paths.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set_path_resources() {
exit 1
fi
fi
if using_npm_run_dev; then
if using_dev_mode; then
if is_windows; then
fatal "npm operation not yet implemented for Windows"
fi
Expand Down
4 changes: 2 additions & 2 deletions bats/tests/helpers/vm.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ factory_reset() {
capture_logs
fi

if using_npm_run_dev; then
if using_dev_mode; then
if is_unix; then
run rdctl shutdown
run pkill_by_path "$PATH_REPO_ROOT/node_modules"
Expand Down Expand Up @@ -133,7 +133,7 @@ start_container_engine() {
EOF
fi

if using_npm_run_dev; then
if using_dev_mode; then
# translate args back into the internal API format
local api_args=()
for arg in "${args[@]}"; do
Expand Down

0 comments on commit 8ed1104

Please sign in to comment.