#!/usr/bin/env bash
set -euo pipefail
source "$(dirname "$0")/assert.sh"

export RTX_EXPERIMENTAL=1
eval "$(rtx activate bash)" && eval "$(rtx hook-env)"
assert "node -v" "v20.0.0"
rtx shell node@18.0.0 && eval "$(rtx hook-env)"
assert "node -v" "v18.0.0"
export RTX_NODE_VERSION=20.0.0 && eval "$(rtx hook-env)"
assert "node -v" "v20.0.0"
