assert
assert copied to clipboard
Maximum Call Stack Exceeded when checking Document type
When using assert.is, I'm running into a Maximum Call Stack Exceeded RangeError when the value is of type Document. All other types work fine. This is because prettyprint is seeing it as typeof "object" and is trying to recurse over its properties to print them. I can submit a fix for this later.
var doc = document.implementation.createDocument(null, 'doc');
assert(doc).is(DataView, Blob, Document);
prettyPrint has to handle circular refs.