Please sign in to comment.
Allow users to set the maximum length of array that the pretty-printer
will print out. Currently, jasmine's pretty printer will iterate over an entire array, formatting every element recursively. For very large arrays, this can crash the page, or cause a 'slow script' warning. This commit exposes a 'MAX_PRETTY_PRINT_ARRAY_LENGTH' option. If an array larger than this is encountered, recursion will stop and the array length will be printed instead e.g. "Array". The 'MAX_PRETTY_PRINT_ARRAY_LENGTH' option defaults to 100. This is length of array will not kill your browser, but will allow you to see big arrays, if you can stomach the output.
- Loading branch information...
Showing with 24 additions and 4 deletions.