fix jsDump parsing
This commit is contained in:
parent
dc134dcf24
commit
9c78766ded
@ -39,6 +39,10 @@ var jsDump;
|
||||
var reName = /^function (\w+)/;
|
||||
|
||||
jsDump = {
|
||||
doParse:function(obj) {
|
||||
this.alreadySeenObjects = [];
|
||||
return this.parse(obj);
|
||||
},
|
||||
parse:function( obj, type ){//type is used mostly internally, you can fix a (custom)type in advance
|
||||
var parser = this.parsers[ type || this.typeOf(obj) ];
|
||||
type = typeof parser;
|
||||
@ -146,7 +150,7 @@ var jsDump;
|
||||
if (!this.ignoreFunctions || this.typeOf(map[key]) != 'function') {
|
||||
var value = "<< LOOP >>";
|
||||
|
||||
if (this.alreadySeenObjects.indexOf(map[key]) == -1) {
|
||||
if ((typeof map[key] != 'object') || this.alreadySeenObjects.indexOf(map[key]) == -1) {
|
||||
this.alreadySeenObjects.push(map[key]);
|
||||
value = this.parse(map[key]);
|
||||
}
|
||||
|
@ -40,11 +40,11 @@ module Jasmine
|
||||
} catch (e) {}
|
||||
|
||||
if (usejsDump) {
|
||||
var dump = jsDump.parse(data);
|
||||
var dump = jsDump.doParse(data);
|
||||
if (dump.indexOf("\\n") == -1) {
|
||||
JHW.log(dump);
|
||||
} else {
|
||||
JHW.log("jsDump: " + jsDump.parse(data));
|
||||
JHW.log("jsDump: " + dump);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user