Skip to content

Commit ea78d12

Browse files
committed
Add some simple method value tests
1 parent 78f35bc commit ea78d12

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/cljs/cljs/core_test.cljs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
; You must not remove this notice, or any other, from this software.
88

99
(ns cljs.core-test
10+
(:refer-global :only [Object String])
1011
(:refer-clojure :exclude [iter])
1112
(:require [cljs.test :refer-macros [deftest testing is are]]
1213
[clojure.test.check :as tc]
@@ -1993,3 +1994,16 @@
19931994
(is (NaN? (min 1 ##NaN)))
19941995
(is (NaN? (max ##NaN 1)))
19951996
(is (NaN? (max 1 ##NaN)))))
1997+
1998+
(deftest test-static-props-methods
1999+
(is (= [] PersistentVector/EMPTY))
2000+
(let [f String/fromCharCode]
2001+
(is (= "A" (f 65)))))
2002+
2003+
(deftest test-new-method
2004+
(let [f Object/new]
2005+
(some? (f))))
2006+
2007+
(deftest test-instance-method-new
2008+
(is (= ["FOO" "BAR" "BAZ"]
2009+
(map String/.toUpperCase ["foo" "bar" "baz"]))))

0 commit comments

Comments
 (0)