Skip to content

Commit

Permalink
Attempt to reproduce issue, fail to do so
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorlu committed Jul 1, 2024
1 parent 6333aa6 commit e756580
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion test/babashka/neil/dep_upgrade_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,25 @@
(spit test-file-path "{:deps {hiccup/hiccup {:mvn/version \"1.0.0\" :neil/pinned true} cheshire/cheshire {:mvn/version \"4.0.0\"}}}")
(test-util/neil "dep upgrade" :deps-file test-file-path)
(is (= "1.0.0" (:mvn/version (get-dep-version 'hiccup/hiccup))) "Pinned deps are left alone")
(is (version-clj/older? "4.0.0" (:mvn/version (get-dep-version 'cheshire/cheshire))) "Unpinned, outdated deps are updated")))
(is (version-clj/older? "4.0.0" (:mvn/version (get-dep-version 'cheshire/cheshire))) "Unpinned, outdated deps are updated"))

(testing "git deps can be pinned"
(let [deps-data '{:deps {io.github.nextjournal/markdown {:git/sha "6683c48dfdb23404a23057817b6ac3acf0310bca" :neil/pinned true}}}]
(spit test-file-path deps-data)
(test-util/neil "dep upgrade" :deps-file test-file-path)
(slurp test-file-path)
(is (= "6683c48dfdb23404a23057817b6ac3acf0310bca"
(:git/sha (get-dep-version 'io.github.nextjournal/markdown)))))))

(comment
(binding [*print-namespace-maps* false]
(let [deps-data '{:deps {io.github.nextjournal/markdown {:git/sha "6683c48dfdb23404a23057817b6ac3acf0310bca" :neil/pinned true}}}]
(spit test-file-path deps-data)
(test-util/neil "dep upgrade" :deps-file test-file-path)
(slurp test-file-path)
(assert (= deps-data (edn/read-string (slurp test-file-path))))))

)

(deftest dep-upgrade-test-one-lib
(testing "specifying :lib only updates one dep"
Expand Down

0 comments on commit e756580

Please sign in to comment.