ospec: display brackets in errors about arrays
This commit is contained in:
parent
4ad4fdf75c
commit
88b91b1073
1 changed files with 1 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ module.exports = new function init() {
|
|||
results.push(result)
|
||||
}
|
||||
function serialize(value) {
|
||||
if (value === null || typeof value === "object" || typeof value === "number") return String(value)
|
||||
if (value === null || (typeof value === "object" && !(value instanceof Array)) || typeof value === "number") return String(value)
|
||||
else if (typeof value === "function") return value.name || "<anonymous function>"
|
||||
try {return JSON.stringify(value)} catch (e) {return String(value)}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue