Skip to content

Commit 815400d

Browse files
committed
fix: standardize capitalization of error messages for Node.js checks
1 parent ec2c0df commit 815400d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

internal/system/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func GetInstalledNodeVersion() (string, error) {
1313
// Check if Node.js is installed
1414
nodePath, err := exec.LookPath("node")
1515
if err != nil {
16-
return "", fmt.Errorf("Node.js is not installed: %w", err)
16+
return "", fmt.Errorf("node.js is not installed: %w", err)
1717
}
1818

1919
// Get the Node.js version

internal/system/node_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
func TestGetNodeVersionNotInstalled(t *testing.T) {
1313
t.Setenv("PATH", "")
1414
_, err := GetInstalledNodeVersion()
15-
assert.ErrorContains(t, err, "Node.js is not installed")
15+
assert.ErrorContains(t, err, "node.js is not installed")
1616
}
1717

1818
func TestGetNodeVersion(t *testing.T) {
@@ -30,15 +30,15 @@ func TestNodeVersionIsAtLeast(t *testing.T) {
3030
hit, err := IsNodeVersionAtLeast("16.0.0")
3131

3232
assert.NoError(t, err)
33-
assert.True(t, hit, "Node.js version should be at least 16.0.0")
33+
assert.True(t, hit, "node.js version should be at least 16.0.0")
3434
}
3535

3636
func TestNodeVersionIsNotAtLeast(t *testing.T) {
3737
setupFakeNode(t, t.TempDir(), "14.17.0")
3838
hit, err := IsNodeVersionAtLeast("16.0.0")
3939

4040
assert.NoError(t, err)
41-
assert.False(t, hit, "Node.js version should not be at least 16.0.0")
41+
assert.False(t, hit, "node.js version should not be at least 16.0.0")
4242
}
4343

4444
func setupFakeNode(t *testing.T, tmpDir string, version string) {

0 commit comments

Comments
 (0)