[Pkg-javascript-commits] [sockjs-client] 324/434: Cosmetic: there is no fail(true) in qunit - use ok(false) instead

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:22 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 c7ed35aeb0547f8f930586297ce25540e9a97111
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Wed Jan 18 13:24:53 2012 +0000

    Cosmetic: there is no fail(true) in qunit - use ok(false) instead
---
 tests/html/src/domtests.coffee      |  2 +-
 tests/html/src/endtoendtests.coffee | 10 +++++-----
 tests/html/src/tests.coffee         |  6 +++---
 tests/html/src/unittests.coffee     |  4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/tests/html/src/domtests.coffee b/tests/html/src/domtests.coffee
index 3dd3ccf..9b014c8 100644
--- a/tests/html/src/domtests.coffee
+++ b/tests/html/src/domtests.coffee
@@ -118,7 +118,7 @@ test_wrong_url = (name, url, statuses) ->
     expect(2)
     x = new u[name]('GET', url, null)
     x.onchunk = ->
-        fail(true)
+        ok(false)
     x.onfinish = (status, text) ->
         ok(u.arrIndexOf(statuses, status) isnt -1)
         equal(text, '')
diff --git a/tests/html/src/endtoendtests.coffee b/tests/html/src/endtoendtests.coffee
index 84b40bd..59840cf 100644
--- a/tests/html/src/endtoendtests.coffee
+++ b/tests/html/src/endtoendtests.coffee
@@ -56,9 +56,9 @@ asyncTest "invalid url 404", ->
     r = newSockJS('/invalid_url', 'jsonp-polling')
     ok(r)
     r.onopen = (e) ->
-        fail(true)
+        ok(false)
     r.onmessage = (e) ->
-        fail(true)
+        ok(false)
     r.onclose = (e) ->
         if u.isXHRCorsCapable() < 4
             equals(e.code, 1002)
@@ -76,7 +76,7 @@ asyncTest "invalid url port", ->
     r = newSockJS(dl.protocol + '//' + dl.hostname + ':1079', 'jsonp-polling')
     ok(r)
     r.onopen = (e) ->
-        fail(true)
+        ok(false)
     r.onclose = (e) ->
         if u.isXHRCorsCapable() < 4
             equals(e.code, 1002)
@@ -92,9 +92,9 @@ asyncTest "disabled websocket test", ->
         expect(3)
         r = newSockJS('/disabled_websocket_echo', 'websocket')
         r.onopen = (e) ->
-            fail(true)
+            ok(false)
         r.onmessage = (e) ->
-            fail(true)
+            ok(false)
         r.onclose = (e) ->
             equals(e.code, 2000)
             equals(e.reason, "All transports failed")
diff --git a/tests/html/src/tests.coffee b/tests/html/src/tests.coffee
index ed9846d..657aae7 100644
--- a/tests/html/src/tests.coffee
+++ b/tests/html/src/tests.coffee
@@ -20,7 +20,7 @@ echo_factory_factory = (protocol, messages) ->
         a = messages.slice(0)
         r = newSockJS('/echo', protocol)
         r.onopen = (e) ->
-            log('onopen ' + e)
+            #log('onopen ' + e)
             ok(true)
             r.send(a[0])
         r.onmessage = (e) ->
@@ -248,7 +248,7 @@ factor_user_close = (protocol) ->
             r.close(3000, "User message")
             ok(counter is 1)
         r.onmessage = () ->
-            fail(true)
+            ok(false)
             counter += 1
         r.onclose = (e) ->
             counter += 1
@@ -265,7 +265,7 @@ factor_server_close = (protocol) ->
         r.onopen = (e) ->
             ok(true)
         r.onmessage = (e) ->
-            fail(true)
+            ok(false)
         r.onclose = (e) ->
             equals(e.code, 3000)
             equals(e.reason, "Go away!")
diff --git a/tests/html/src/unittests.coffee b/tests/html/src/unittests.coffee
index 1ed2b06..5fd4ba1 100644
--- a/tests/html/src/unittests.coffee
+++ b/tests/html/src/unittests.coffee
@@ -151,8 +151,8 @@ test "EventEmitter", ->
     r = new SockJS('//wrongdomainthatdoesntresolveatall/abc', null,
                    {protocols_whitelist: []})
     r.addEventListener 'message', -> ok(true)
-    r.onmessage = -> fail(true)
-    bluff = -> fail(true)
+    r.onmessage = -> ok(false)
+    bluff = -> ok(false)
     r.addEventListener 'message', bluff
     r.removeEventListener 'message', bluff
     r.addEventListener 'message', bluff

-- 
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