don't require async tests to also return synchronously
This commit is contained in:
parent
54694e3d7e
commit
f996a24ce2
1 changed files with 15 additions and 14 deletions
|
@ -558,15 +558,15 @@ Ox.test = function(file, callback) {
|
|||
item.tests && item.tests.some(function(test) {
|
||||
return test.result;
|
||||
}) && item.tests.forEach(function(test) {
|
||||
Ox.Log('TEST', test.statement);
|
||||
actual = eval(test.statement);
|
||||
match = test.statement.match(/Ox\.test\.async\('([\w\.]+)'/);
|
||||
if (match) {
|
||||
Ox.test.data[file].tests[match[1]] = {
|
||||
section: item.section,
|
||||
statement: test.statement
|
||||
};
|
||||
}
|
||||
Ox.Log('TEST', test.statement);
|
||||
actual = eval(test.statement);
|
||||
} else {
|
||||
if (test.result) {
|
||||
Ox.test.data[file].results.push({
|
||||
actual: JSON.stringify(actual),
|
||||
|
@ -579,6 +579,7 @@ Ox.test = function(file, callback) {
|
|||
), actual)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Ox.test.data[file].done = true;
|
||||
|
|
Loading…
Reference in a new issue