[Pkg-javascript-commits] [sockjs-client] 65/434: Merged two CS files with qunit tests to one.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 5afaaac3f2e68614594793754e305d7a4ed11c7f
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Wed Aug 10 14:47:53 2011 +0100

    Merged two CS files with qunit tests to one.
---
 Makefile                                           |  7 ++---
 tests/html/src/test-run.coffee                     | 28 -------------------
 .../html/src/{test-factory.coffee => tests.coffee} | 32 ++++++++++++++++++++++
 tests/html/tests-qunit.html                        |  3 +-
 4 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/Makefile b/Makefile
index ec852a3..30c1ab4 100644
--- a/Makefile
+++ b/Makefile
@@ -16,12 +16,9 @@ sockjs.pretty.js: lib/*js
 tests/html/lib/sockjs.js: sockjs.js
 	cp $< $@
 
-tests/html/lib/test-factory.js: tests/html/src/test-factory.coffee
-	coffee -o tests/html/lib/ -c --bare $<
-
-tests/html/lib/test-run.js: tests/html/src/test-run.coffee
+tests/html/lib/tests.js: tests/html/src/tests.coffee
 	coffee -o tests/html/lib/ -c --bare $<
 
 test: tests
-tests: tests/html/lib/sockjs.js tests/html/lib/test-factory.js tests/html/lib/test-run.js
+tests: tests/html/lib/sockjs.js tests/html/lib/tests.js
 	node tests/server.js
diff --git a/tests/html/src/test-run.coffee b/tests/html/src/test-run.coffee
deleted file mode 100644
index d08e49c..0000000
--- a/tests/html/src/test-run.coffee
+++ /dev/null
@@ -1,28 +0,0 @@
-
-test_protocol = (protocol) ->
-    module(protocol)
-    if not SockJS[protocol] or not SockJS[protocol].enabled()
-        test "[unsupported]", ->
-                log('Unsupported protocol: "' + protocol + '"')
-    else
-        asyncTest("echo", factor_echo_basic(protocol))
-        asyncTest("echo2", factor_echo_rich(protocol))
-        asyncTest("unicode", factor_echo_unicode(protocol))
-        asyncTest("special_chars", factor_echo_special_chars(protocol))
-        asyncTest("large_message", factor_echo_large_message(protocol))
-        asyncTest("batch_large", factor_batch_large(protocol))
-
-        asyncTest("user close", factor_user_close(protocol))
-        asyncTest("server close", factor_server_close(protocol))
-        asyncTest("invalid url 404", test_invalid_url_404(protocol))
-        asyncTest("invalid url 500", test_invalid_url_500(protocol))
-        asyncTest("invalid url port", test_invalid_url_port(protocol))
-
-
-protocols = ['websocket',
-        'iframe-eventsource',
-        'xhr-polling',
-        'iframe-xhr-polling',
-        'jsonp-polling']
-for protocol in protocols
-    test_protocol(protocol)
diff --git a/tests/html/src/test-factory.coffee b/tests/html/src/tests.coffee
similarity index 83%
rename from tests/html/src/test-factory.coffee
rename to tests/html/src/tests.coffee
index 4b5c44b..39ac9b6 100644
--- a/tests/html/src/test-factory.coffee
+++ b/tests/html/src/tests.coffee
@@ -196,3 +196,35 @@ test_invalid_url_port = (protocol) ->
             log('port', e)
             equals(e.status, 2000)
             start()
+
+
+
+
+
+test_protocol = (protocol) ->
+    module(protocol)
+    if not SockJS[protocol] or not SockJS[protocol].enabled()
+        test "[unsupported]", ->
+                log('Unsupported protocol: "' + protocol + '"')
+    else
+        asyncTest("echo", factor_echo_basic(protocol))
+        asyncTest("echo2", factor_echo_rich(protocol))
+        asyncTest("unicode", factor_echo_unicode(protocol))
+        asyncTest("special_chars", factor_echo_special_chars(protocol))
+        asyncTest("large_message", factor_echo_large_message(protocol))
+        asyncTest("batch_large", factor_batch_large(protocol))
+
+        asyncTest("user close", factor_user_close(protocol))
+        asyncTest("server close", factor_server_close(protocol))
+        asyncTest("invalid url 404", test_invalid_url_404(protocol))
+        asyncTest("invalid url 500", test_invalid_url_500(protocol))
+        asyncTest("invalid url port", test_invalid_url_port(protocol))
+
+
+protocols = ['websocket',
+        'iframe-eventsource',
+        'xhr-polling',
+        'iframe-xhr-polling',
+        'jsonp-polling']
+for protocol in protocols
+    test_protocol(protocol)
diff --git a/tests/html/tests-qunit.html b/tests/html/tests-qunit.html
index 48899fa..382681d 100644
--- a/tests/html/tests-qunit.html
+++ b/tests/html/tests-qunit.html
@@ -14,8 +14,7 @@
   <script type="text/javascript" src="static/qunit.min.js"></script>
 
   <script type="text/javascript" src="config.js"></script>
-  <script type="text/javascript" src="lib/test-factory.js"></script>
-  <script type="text/javascript" src="lib/test-run.js"></script>
+  <script type="text/javascript" src="lib/tests.js"></script>
 </head>
 <body>
   <p>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list