Commits

Jop de Klein  committed dae1a68

Making sure snap is tested before producing a build

  • Participants
  • Parent commits 2738831

Comments (0)

Files changed (5)

 OUTPUT_FILE = snap-${VERSION}.js
 OUTPUT_FILE_MIN = snap-${VERSION}-min.js
 
-snap:
+snap: unittest
 	@echo 'Combining source files'
 	@mkdir -p ${BUILD_DIR}
 	@cat ${JS_FILES} > ${BUILD_DIR}/${OUTPUT_FILE}
 	@echo 'Minifying source'
 	@java -jar lib/google-closure-compiler.jar --js ${BUILD_DIR}/${OUTPUT_FILE} --js_output_file ${BUILD_DIR}/${OUTPUT_FILE_MIN}
-	
-test:
+
+unittest:
 	@echo 'Run tests against source'
+	@@sh test/lib/run_testdriver.sh
+	# java -jar test/lib/JsTestDriver.jar --config test/lib/jsTestDriver.conf --port 4224 --browser  --tests all --testOutput testOutputDir
 	# @java -jar lib/js.jar 
 
 clean:

File lib/JsTestDriver-1.2.2.jar

Binary file removed.

File lib/jsTestDriver.conf

-server: http://localhost:9876
-
-load:
-  - ../src/js/lib/sizzle-852d3d0a60de709e83b6/sizzle.js
-  - ../src/js/*.js
-  # - ../src/js/snap.js
-  # - ../src/js/snap.nodjs
-  # - ../src/js/snap.utils.js
-  # - ../src/js/snap.iterator.js
-  - ../test/unit/*.js
-  # - ../test/unit/equiv.js
-  # - ../test/unit/QUnitAdapter.js
-  # - ../test/unit/test.snap.iterator.js

File test/lib/JsTestDriver-1.2.2.jar

Binary file added.

File test/lib/jsTestDriver.conf

+server: http://localhost:9876
+
+load:
+  - ../../src/js/lib/sizzle-852d3d0a60de709e83b6/sizzle.js
+  - ../../src/js/*.js
+  # - ../src/js/snap.js
+  # - ../src/js/snap.nodjs
+  # - ../src/js/snap.utils.js
+  # - ../src/js/snap.iterator.js
+  - ../../test/unit/*.js
+  # - ../test/unit/equiv.js
+  # - ../test/unit/QUnitAdapter.js
+  # - ../test/unit/test.snap.iterator.js
+
+# plugin:
+#  - name: "coverage"
+#    jar: "plugins/coverage-1.2.2.jar"
+#    module: "com.google.jstestdriver.coverage.CoverageModule"