From ea78d12e063cb32fe51a11453007d4511ff3adf6 Mon Sep 17 00:00:00 2001 From: David Nolen Date: Sun, 23 Nov 2025 08:10:08 -0500 Subject: [PATCH] Add some simple method value tests --- src/test/cljs/cljs/core_test.cljs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/cljs/cljs/core_test.cljs b/src/test/cljs/cljs/core_test.cljs index c62b93934..3cd24205a 100644 --- a/src/test/cljs/cljs/core_test.cljs +++ b/src/test/cljs/cljs/core_test.cljs @@ -7,6 +7,7 @@ ; You must not remove this notice, or any other, from this software. (ns cljs.core-test + (:refer-global :only [Object String]) (:refer-clojure :exclude [iter]) (:require [cljs.test :refer-macros [deftest testing is are]] [clojure.test.check :as tc] @@ -1993,3 +1994,16 @@ (is (NaN? (min 1 ##NaN))) (is (NaN? (max ##NaN 1))) (is (NaN? (max 1 ##NaN))))) + +(deftest test-static-props-methods + (is (= [] PersistentVector/EMPTY)) + (let [f String/fromCharCode] + (is (= "A" (f 65))))) + +(deftest test-new-method + (let [f Object/new] + (some? (f)))) + +(deftest test-instance-method-new + (is (= ["FOO" "BAR" "BAZ"] + (map String/.toUpperCase ["foo" "bar" "baz"]))))