Skip to content

Commit 8d65bab

Browse files
anmonteiroswannodette
authored andcommitted
CLJS-2249: Provide a test for d4b871c
1 parent d4b871c commit 8d65bab

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

src/test/cljs/deps.cljs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{:externs ["externs.js"]}
1+
{:externs ["externs.js"]
2+
:foreign-libs [{:file "calculator_global.js"
3+
:provides ["thirdparty.calculator"]}]}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
;; Copyright (c) Rich Hickey. All rights reserved.
2+
;; The use and distribution terms for this software are covered by the
3+
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4+
;; which can be found in the file epl-v10.html at the root of this distribution.
5+
;; By using this software in any fashion, you are agreeing to be bound by
6+
;; the terms of this license.
7+
;; You must not remove this notice, or any other, from this software.
8+
9+
(ns foreign-libs-cljs-2249.core
10+
(:require [thirdparty.calculator]))
11+
12+
(defn main []
13+
(println (js/Calculator.add 1 2)))

src/test/clojure/cljs/build_api_tests.clj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,3 +401,12 @@
401401
; (.delete (io/file "package.json"))
402402
; (.delete (io/file "yarn.lock"))
403403
; (test/delete-node-modules))
404+
405+
(deftest test-cljs-2249
406+
(let [out (io/file (test/tmp-dir) "cljs-2249-out")
407+
root (io/file "src" "test" "cljs_build")
408+
opts {:output-dir (str out)
409+
:target :nodejs}]
410+
(test/delete-out-files out)
411+
(build/build (build/inputs (io/file root "foreign_libs_cljs_2249")) opts)
412+
(is (.exists (io/file out "calculator_global.js")))))

0 commit comments

Comments
 (0)