Skip to content

Commit

Permalink
test(planner/nodejs): Test .nvmrc extension
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 committed Oct 16, 2023
1 parent 5a7302e commit b1f3b58
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/nodejs/plan_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package nodejs

import (
"strconv"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -65,3 +66,13 @@ func TestGetNodeVersion_TildeWithWildcard(t *testing.T) {
v := getNodeVersion("~16.*")
assert.Equal(t, "16", v)
}

func TestGetNodeVersion_NvmRcLts(t *testing.T) {
v := getNodeVersion("lts/*")
assert.Equal(t, strconv.FormatUint(maxLtsNodeVersion, 10), v)
}

func TestGetNodeVersion_NvmRcLatest(t *testing.T) {
v := getNodeVersion("node")
assert.Equal(t, strconv.FormatUint(maxNodeVersion, 10), v)
}

0 comments on commit b1f3b58

Please sign in to comment.