mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-16 18:53:31 +01:00
More testing stuff.
This commit is contained in:
@@ -23,12 +23,16 @@ function wrapAssertNoErrors(func, message) {
|
||||
function assertMessage(funcName, want, got, message) {
|
||||
if (typeof want === "string")
|
||||
return utils.assertEqual(funcName, want, got, message);
|
||||
else if (typeof want === "function")
|
||||
return utils.test(want(got), {
|
||||
else if (typeof want === "function") {
|
||||
var res = want(got);
|
||||
if (res === undefined)
|
||||
return true;
|
||||
return utils.test(res, {
|
||||
function: funcName,
|
||||
want: want, got: got,
|
||||
comment: message
|
||||
});
|
||||
}
|
||||
else
|
||||
return utils.test(want.test(got), {
|
||||
function: funcName,
|
||||
|
||||
Reference in New Issue
Block a user