We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f7a986 commit 1cc0f1eCopy full SHA for 1cc0f1e
src/test/cljs/cljs/core_test.cljs
@@ -2042,3 +2042,17 @@
2042
(is (= 11 @c))
2043
(is (= [11 0] (reset-vals! c 0)))
2044
(is (= 0 @c)))))
2045
+
2046
+(defn test-keys [& {:as opts, :keys [a b]}]
2047
+ [a b opts])
2048
2049
+(deftest test-cljs-3299-trailing-keys
2050
+ (testing "verify proper handling of trailing keys"
2051
+ (is (= (test-keys :a 1, :b 2)
2052
+ [1 2 {:a 1, :b 2}]))
2053
+ (is (= (test-keys {:a 1, :b 2})
2054
2055
+ (is (= (test-keys {:a 1, :b 2, :c 3})
2056
+ [1 2 {:a 1, :b 2, :c 3}]))
2057
+ (is (= (test-keys :d 4 {:a 1, :b 2, :c 3})
2058
+ [1 nil {:d 4, :a 1, :c 3, nil nil}]))))
0 commit comments