Ox.test: handle non-null values for which JSON.stringify returns 'null'
This commit is contained in:
parent
4dc11cd256
commit
110be11a05
1 changed files with 4 additions and 1 deletions
|
@ -822,7 +822,10 @@ Ox.test = function(argument, callback) {
|
||||||
}
|
}
|
||||||
if (!isAsync && test.expected) {
|
if (!isAsync && test.expected) {
|
||||||
Ox.test.data[id].results.push({
|
Ox.test.data[id].results.push({
|
||||||
actual: JSON.stringify(actual),
|
actual: Ox.isEqual(actual, -0) ? '-0'
|
||||||
|
: Ox.isNaN(actual) ? 'NaN'
|
||||||
|
: Ox.isUndefined(actual) ? 'undefined'
|
||||||
|
: JSON.stringify(actual),
|
||||||
expected: test.expected,
|
expected: test.expected,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
section: item.section,
|
section: item.section,
|
||||||
|
|
Loading…
Reference in a new issue