Pretty print json unit test error results with Jasmine

0 Comments

      If you use the standard HTML reporter for jasmine an expect like: expect(JSON.stringify(actual)).toEqual(JSON.stringify(expected)); would result in:   If you replace the div tag with a pre tag in the “jasmine-html.js” file.  

Jasmine 2.0 reporting html page.

0 Comments

Just an example HTML page for reporting Jasmine 2.0 tests.   <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Jasmine 2.0 example page.</title> <link href="jasmine.css" rel="stylesheet" /> <script src="jasmine.js"></script> <script src="jasmine-html.js"></script> <script src="boot.js"></script> </head> <body> <script>