Tweak to path-finding tests. Specify test patterns outside of mocha.opts

This commit is contained in:
Nicholas Dudfield
2014-01-24 17:31:19 +07:00
committed by Vinnie Falco
parent 580d179dd0
commit aad074cd8e
4 changed files with 11 additions and 12 deletions

View File

@@ -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"
}
}

View File

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

View File

@@ -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")

View File

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