mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 10:45:50 +00:00
Tweak to path-finding tests. Specify test patterns outside of mocha.opts
This commit is contained in:
committed by
Vinnie Falco
parent
580d179dd0
commit
aad074cd8e
@@ -22,7 +22,7 @@
|
||||
},
|
||||
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
"test": "mocha test/websocket-test.js test/server-test.js test/*-test.{js,coffee}"
|
||||
},
|
||||
|
||||
"repository": {
|
||||
@@ -31,4 +31,4 @@
|
||||
},
|
||||
|
||||
"readmeFilename": "README.md"
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,4 @@
|
||||
--compilers coffee:coffee-script
|
||||
--ui tdd
|
||||
--timeout 10000
|
||||
--slow 600
|
||||
test/websocket-test.js
|
||||
test/server-test.js
|
||||
test/*-test.{js,coffee}
|
||||
--slow 600
|
||||
@@ -318,11 +318,11 @@ create_path_test = (pth) ->
|
||||
one_message (m) -> sent = m
|
||||
|
||||
error_info = (m, more) ->
|
||||
info =
|
||||
info =
|
||||
path_expected: pth,
|
||||
path_find_request: sent,
|
||||
path_find_updates: messages
|
||||
|
||||
|
||||
extend(info, more) if more?
|
||||
ledger.pretty_json(info)
|
||||
|
||||
@@ -350,8 +350,10 @@ create_path_test = (pth) ->
|
||||
# TODO:hack:
|
||||
expand_alternative alt for alt in m.alternatives
|
||||
|
||||
|
||||
messages[if updates then "update-#{updates}" else 'initial-response'] = m
|
||||
updates++
|
||||
# console.log updates
|
||||
|
||||
assert m.alternatives.length >= max_seen,
|
||||
"Subsequent path_find update' should never have less " +
|
||||
@@ -359,10 +361,10 @@ create_path_test = (pth) ->
|
||||
|
||||
max_seen = m.alternatives.length
|
||||
|
||||
if updates == 2
|
||||
testutils.ledger_close(self.remote, -> )
|
||||
# if updates == 2
|
||||
# testutils.ledger_close(self.remote, -> )
|
||||
|
||||
if updates == 3
|
||||
if updates == 2
|
||||
# "TODO: need to patch ripple-lib"
|
||||
# self.log_pre(self.server.get_logs(), "Server Logs")
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# flags set in mocha.opts
|
||||
mocha
|
||||
mocha test/websocket-test.js test/server-test.js test/*-test.{js,coffee}
|
||||
Reference in New Issue
Block a user