Skip to content

Commit

Permalink
deleted old test
Browse files Browse the repository at this point in the history
  • Loading branch information
eranturgeman committed Sep 25, 2024
1 parent 1a69f03 commit 917a372
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions build/utils/npm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,31 +234,6 @@ func TestDependencyWithNoIntegrity(t *testing.T) {
assert.Greaterf(t, len(dependencies), 0, "Error: dependencies are not found!")
}

/*
// This test case verifies that CalculateNpmDependenciesList correctly handles the exclusion of 'node_modules'
// and updates 'package-lock.json' as required, based on the 'IgnoreNodeModules' and 'OverwritePackageLock' parameters.
func TestDependencyPackageLockOnly(t *testing.T) {
npmVersion, _, err := GetNpmVersionAndExecPath(logger)
require.NoError(t, err)
if !npmVersion.AtLeast("7.0.0") {
t.Skip("Running on npm v7 and above only, skipping...")
}
path, cleanup := tests.CreateTestProject(t, filepath.Join("..", "testdata/npm/project6"))
defer cleanup()
assert.NoError(t, utils.MoveFile(filepath.Join(path, "package-lock_test.json"), filepath.Join(path, "package-lock.json")))
// sleep so the package.json modified time will be bigger than the package-lock.json, this make sure it will recalculate lock file.
require.NoError(t, os.Chtimes(filepath.Join(path, "package.json"), time.Now(), time.Now().Add(time.Millisecond*20)))
// Calculate dependencies.
dependencies, err := CalculateDependenciesMap("npm", path, "jfrogtest",
NpmTreeDepListParam{Args: []string{}, IgnoreNodeModules: true, OverwritePackageLock: true}, logger, false)
assert.NoError(t, err)
var expectedRes = getExpectedRespForTestDependencyPackageLockOnly()
assert.Equal(t, expectedRes, dependencies)
}
*/

func TestCalculateDependenciesMap(t *testing.T) {
testCases := []struct {
name string
Expand Down

0 comments on commit 917a372

Please sign in to comment.