api-test
Advanced tools
Comparing version 3.0.0 to 3.1.0
10
check.js
@@ -19,2 +19,10 @@ 'use strict' | ||
try { | ||
// Call toJSON() if present | ||
if (actual !== null && actual !== undefined && typeof actual.toJSON === 'function') { | ||
actual = actual.toJSON() | ||
} | ||
if (expected !== null && expected !== undefined && typeof expected.toJSON === 'function') { | ||
expected = expected.toJSON() | ||
} | ||
if (types.indexOf(expected) !== -1) { | ||
@@ -107,2 +115,2 @@ // Simple type check | ||
}) | ||
} | ||
} |
{ | ||
"name": "api-test", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"author": "Sitegui <sitegui@sitegui.com.br>", | ||
@@ -5,0 +5,0 @@ "description": "API testing made simple", |
@@ -23,4 +23,5 @@ # user/login | ||
error: null | ||
id: user._id | ||
token: String | ||
### Find in users | ||
user with token: out.token |
@@ -32,4 +32,5 @@ # user/login | ||
error: null | ||
id: user._id | ||
token: String | ||
### Find in users | ||
user with token: out.token |
@@ -24,4 +24,5 @@ # Signup + Login | ||
error: null | ||
id: String | ||
token: String | ||
### Find in users | ||
user with token: out.token |
@@ -98,2 +98,3 @@ 'use strict' | ||
res.success({ | ||
id: user._id, | ||
token: user.token | ||
@@ -100,0 +101,0 @@ }) |
69870
32
2036