Skip to content
Browse files

added qunit

  • Loading branch information...
1 parent fe100e6 commit b1143f5b596f21d672e4ba1b7b037eef7802d0d5 @clog committed Dec 25, 2012
Showing with 7,506 additions and 0 deletions.
  1. +8 −0 libraries/qunit/.gitignore
  2. +55 −0 libraries/qunit/AUTHORS.txt
  3. +462 −0 libraries/qunit/History.md
  4. +62 −0 libraries/qunit/README.md
  5. +24 −0 libraries/qunit/addons/.jshintrc
  6. +17 −0 libraries/qunit/addons/canvas/README.md
  7. +76 −0 libraries/qunit/addons/canvas/canvas-test.js
  8. +15 −0 libraries/qunit/addons/canvas/canvas.html
  9. +6 −0 libraries/qunit/addons/canvas/qunit-canvas.js
  10. +18 −0 libraries/qunit/addons/close-enough/README.md
  11. +35 −0 libraries/qunit/addons/close-enough/close-enough-test.js
  12. +14 −0 libraries/qunit/addons/close-enough/close-enough.html
  13. +32 −0 libraries/qunit/addons/close-enough/qunit-close-enough.js
  14. +25 −0 libraries/qunit/addons/composite/README.md
  15. +24 −0 libraries/qunit/addons/composite/composite-demo-test.html
  16. +33 −0 libraries/qunit/addons/composite/index.html
  17. +13 −0 libraries/qunit/addons/composite/qunit-composite.css
  18. +105 −0 libraries/qunit/addons/composite/qunit-composite.js
  19. +18 −0 libraries/qunit/addons/junitlogger/README.md
  20. +44 −0 libraries/qunit/addons/junitlogger/index.html
  21. +306 −0 libraries/qunit/addons/junitlogger/junitlogger.js
  22. +16 −0 libraries/qunit/addons/phantomjs/README.md
  23. +127 −0 libraries/qunit/addons/phantomjs/runner.js
  24. +20 −0 libraries/qunit/addons/step/README.md
  25. +26 −0 libraries/qunit/addons/step/qunit-step.js
  26. +15 −0 libraries/qunit/addons/step/step-test.js
  27. +14 −0 libraries/qunit/addons/step/step.html
  28. +6 −0 libraries/qunit/addons/themes/README.md
  29. +371 −0 libraries/qunit/addons/themes/gabe.css
  30. +15 −0 libraries/qunit/addons/themes/gabe.html
  31. +196 −0 libraries/qunit/addons/themes/ninja.css
  32. +15 −0 libraries/qunit/addons/themes/ninja.html
  33. +217 −0 libraries/qunit/addons/themes/nv.css
  34. +15 −0 libraries/qunit/addons/themes/nv.html
  35. +91 −0 libraries/qunit/grunt.js
  36. +37 −0 libraries/qunit/package.json
  37. +27 −0 libraries/qunit/qunit/.jshintrc
  38. +244 −0 libraries/qunit/qunit/qunit.css
  39. +2,118 −0 libraries/qunit/qunit/qunit.js
  40. +9 −0 libraries/qunit/test/.jshintrc
  41. +26 −0 libraries/qunit/test/async.html
  42. +6 −0 libraries/qunit/test/async.js
  43. +1,438 −0 libraries/qunit/test/deepEqual.js
  44. +28 −0 libraries/qunit/test/headless.html
  45. +16 −0 libraries/qunit/test/index.html
  46. +14 −0 libraries/qunit/test/logs.html
  47. +184 −0 libraries/qunit/test/logs.js
  48. +22 −0 libraries/qunit/test/narwhal-test.js
  49. +22 −0 libraries/qunit/test/node-test.js
  50. +10 −0 libraries/qunit/test/swarminject.js
  51. +769 −0 libraries/qunit/test/test.js
View
8 libraries/qunit/.gitignore
@@ -0,0 +1,8 @@
+.project
+*~
+*.diff
+*.patch
+.DS_Store
+.settings
+node_modules
+dist/
View
55 libraries/qunit/AUTHORS.txt
@@ -0,0 +1,55 @@
+Jörn Zaefferer <joern.zaefferer@gmail.com>
+Ariel Flesler <aflesler@gmail.com>
+Scott González <scott.gonzalez@gmail.com>
+Richard Worth <rdworth@gmail.com>
+Philippe Rathé <prathe@gmail.com>
+John Resig <jeresig@gmail.com>
+Will Moffat <will_git@hamstersoup.com>
+Jan Kassens <jan@kassens.net>
+Ziling Zhao <zizhao@cisco.com>
+Ryan Szulczewski <musicmanryan@gmail.com>
+Chris Lloyd <christopher.lloyd@gmail.com>
+Louis-Rémi Babé <public@lrbabe.com>
+Jake Archibald <jake.archibald@bbc.co.uk>
+Frances Berriman <frances.berriman@bbc.co.uk>
+Rune Halvorsen <runefh@gmail.com>
+Chris Thatcher <thatcher.christopher@gmail.com>
+Fábio Rehm <fgrehm@gmail.com>
+Leon Sorokin <leeoniya@gmail.com>
+Douglas Neiner <doug@pixelgraphics.us>
+Paul Elliott <paul@hashrocket.com>
+Nikita Vasilyev <me@elv1s.ru>
+Benjamin Lee <leebenjp@gmail.com>
+Paul Irish <paul.irish@gmail.com>
+Oleg Slobodskoi <oleg008@gmail.com>
+Anton Matzneller <obhvsbypqghgc@gmail.com>
+Aurélien Bombo
+Mathias Bynens <mathias@qiwi.be>
+Erik Vold <erikvvold@gmail.com>
+Wesley Walser <waw325@gmail.com>
+Rob Kinninmont <robk@twitter.com>
+Marc Portier <marc.portier@gmail.com>
+Michael Righi <michael@righi.me>
+Timo Tijhof <krinklemail@gmail.com>
+Jan Alonzo <jmalonzo@taguchimail.com>
+Daniel Trebbien <dtrebbien@gmail.com>
+Bob Fanger <bfanger@gmail.com>
+Markus Messner-Chaney <markus.messner-chaney@xing.com>
+Trevor Parscal <trevorparscal@gmail.com>
+Ashar Voultoiz <hashar@free.fr>
+Jimmy Mabey <jimmy@velsoft.com>
+Domenic Denicola <domenic@domenicdenicola.com>
+Mike Sherov <mike.sherov@gmail.com>
+Seong-A Kong <simonz@daumcorp.com>
+Graham Conzett <conzett@gmail.com>
+Niall Smart <niall@pobox.com>
+Johan Sörlin <spocke@moxiecode.com>
+Gijs Kruitbosch <gijskruitbosch@gmail.com>
+Erkan Yilmaz <erkan77@gmail.com>
+Jonathan Sanchez <jsanchezpando@cirb.irisnet.be>
+Keith Cirkel <github@keithcirkel.co.uk>
+Rick Waldron <waldron.rick@gmail.com>
+Herbert Vojčík <herby@mailbox.sk>
+Richard Gibson <richard.gibson@gmail.com>
+Alex J Burke <alex@alexjeffburke.com>
+Sergii Kliuchnyk <sergiikliuchnyk@gmail.com>
View
462 libraries/qunit/History.md
@@ -0,0 +1,462 @@
+1.10.0 / 2012-08-30
+==================
+
+ * Simplify licensing: Only MIT, no more MIT/GPL dual licensing.
+ * Scroll the window back to top after tests finished running. Fixes #304
+ * Simplify phantomjs runner to use module property in testDone callback
+ * Adds module and test name to the information that is returned in the callback provided to QUnit.log(Function). Fixes #296
+ * Make QUnit.expect() (without arguments) a getter. Fixes #226
+ * Compare the ES6 sticky (y) property for RegExp. Can't add to tests yet. Fixes #284 - deepEqual for RegExp should compare
+ * onerror: force display of global errors despite URL parameters. Fixes #288 - Global failures can be filtered out by test-limiting URL parameters
+ * Remove conditional codepath based on jQuery presence from reset().
+ * Add module filter to UI
+ * Keep a local reference to Date. Fixes #283.
+ * Update copyright to jQuery Foundation.
+
+1.9.0 / 2012-07-11
+==================
+ * added jsdoc for QUnit.assert functions
+ * Styling: radius to 5px and small pass/error border, remove inner shadow
+ * Move checkboxes into toolbar and give them labels and descriptions (as tooltip). Fixes #274 - Improve urlFilter API and UI
+ * Where we recieve no exception in throws() use a relevant message.
+ * Also make module filter case-insensitive. Follow-up to #252
+ * Banner: Link should ignore "testNumber" and "module". Fixes #270
+ * Rename assert.raises to assert.throws. Fixes #267
+ * Change package.json name property to 'qunitjs' to avoid conflicht with node-qunit; will publish next release to npm
+
+1.8.0 / 2012-06-14
+==================
+ * Improve window.onerror handling
+ * (issue #260) config.current should be reset at the right time.
+ * Filter: Implement 'module' url parameter. Fixes #252
+ * raises: ignore global exceptions stemming from test. Fixes #257 - Globally-executed errors sneak past raises in IE
+
+1.7.0 / 2012-06-07
+==================
+
+ * Add config.requireExpects. Fixes #207 - Add option to require all tests to call expect().
+ * Improve extractStacktrace() implementation. Fixes #254 - Include all relevant stack lines
+ * Make filters case-insensitive. Partial fix for #252
+ * is() expects lowercase types. Fixes #250 - Expected Date value is not displayed properly
+ * Fix phantomjs addon header and add readme. Fixes #239
+ * Add some hints to composite addon readme. Fixes #251
+ * Track tests by the order in which they were run and create rerun links based on that number. Fixes #241 - Make Rerun link run only a single test.
+ * Use QUnit.push for raises implementation. Fixes #243
+ * CLI runner for phantomjs
+ * Fix jshint validation until they deal with /** */ comments properly
+ * Update validTest() : Simplify logic, clarify vars and add comments
+ * Refactor assertion helpers into QUnit.assert (backwards compatible)
+ * Add Rerun link to placeholders. Fixes #240
+
+1.6.0 / 2012-05-04
+==================
+
+ * Save stack for each test, use that for failed expect() results, points at the line where test() was called. Fixes #209
+ * Prefix test-output id and ignore that in noglobals check. Fixes #212
+ * Only check for an exports object to detect a CommonJS enviroment. Fixes #237 - Incompatibility with require.js
+ * Add testswarm integration as grunt task
+ * Added padding on URL config checkboxes.
+ * Cleanup composite addon: Use callback registration instead of overwriting them. Set the correct src on rerun link (and dblclick). Remove the composite test itself, as that was a crazy hack not worth maintaining
+ * Cleanup reset() test and usage - run testDone callback first, to allow listeneres ignoring reset assertions
+ * Double clicking on composite test rows opens individual test page
+ * test-message for all message-bearing API reporting details
+
+1.5.0 / 2012-04-04
+==================
+
+ * Modify "Running..." to display test name. Fixes #220
+ * Fixed clearing of sessionStorage in Firefox 3.6.
+ * Fixes #217 by calling "block" with config.current.testEnvironment
+ * Add stats results to data. QUnit.jUnitReport function take one argument { xml:'<?xml ...', results:{failed:0, passed:0, total:0, time:0} }
+ * Add link to MDN about stack property
+
+1.4.0 / 2012-03-10
+==================
+
+ * Prefix test-related session-storage items to make removal more specific. Fixes #213 - Keep hide-passed state when clearing session storage
+ * Update grunt.js with seperate configs for qunit.js and grunt.js, also add tests but disable for now, not passing yet. Add grunt to devDependencies
+ * typo
+ * Cleanup grunt.js, no need for the banner
+ * Fix lint errors and some formatting issues. Use QUnit.pushFailure for noglobals and global error handler.
+ * Fix a missing expect in logs test
+ * Add grunt.js configuration and include some usage instructions in the readme
+ * Update package.json
+ * Partially revert af27eae841c3e1c01c46de72d676f1047e1ee375 - can't move reset around, so also don't wrap in try-catch, as the result of that is effectively swallowed. Can't output the result as the outputting is already done.
+ * Add QUnit.pushFailure to log error conditions like exceptions. Accepts stacktrace as second argument, allowing extraction with catched exceptions (useful even in Safari). Remove old fail() function that would just log to console, not useful anymore as regular test output is much more useful by now. Move up QUnit.reset() call to just make that another failed assertion. Used to not make a test fail. Fixes #210
+ * Update equals and same deprecations to use QUnit.push to provide correct source lines. Fixes #211
+ * Add a test file for narwhal integration. Has to use print instead of console.log. Fails when an assertion fails, something about setInterval...
+ * Apply notrycatch option to setup and teardown as well. Fixes #203. Reorder noglobals check to allow teardown to remove globals that were introduced intentionally. Fixes #204
+ * Extend exports object with QUnit properties at the end of the file to export everything.
+ * Output source line for ok() assertions. Fixes #202
+ * Make test fail if no assertions run. Fixes #178
+ * Sort object output alphabetically in order to improve diffs of objects where properties were set in a different order. Fixes #206
+ * Revert "Change fixture reset behavior", changing #194 and #195 to wontfix.
+
+1.3.0 / 2012-02-26
+==================
+
+ * Cleanup test markup
+ * Fix the jQuery branch of fixture reset. Would break when no fixture exists.
+ * Added initial version of a junitlogger addon.
+ * Escape document.title before inserting into markup. Extends fix for #127
+ * Catch assertions running outside of test() context, make sure source is provided even for ok(). Fixes #98
+ * Improve global object access, based on comments for 1a9120651d5464773256d8a1f2cf2eabe38ea5b3
+ * Clear all sessionStorage entries once all tests passed. Helps getting rid of items from renamed tests. Fixes #101
+ * Set fixed dimensions for #qunit-fixture. Fixes #114
+ * Extend nodejs test runner to check for stacktrace output, twice
+ * Extend nodejs test runner to check for stacktrace output
+ * Generate more base markup, but allow the user to exclude that completelty or choose their own. Fixes #127
+ * Add a simple test file to check basic nodejs integration works
+ * Check for global object to find setTimeout in node
+ * Fix CommonJS export by assigning QUnit to module.exports.
+ * Remove the testEnviromentArg to test(). Most obscure, never used anywhere. test() is still heavily overloaded with argument shifting, this makes it a little more sane. Fixes #172
+ * Serialize expected and actual values only when test fails. Speeds up output of valid tests, especially for lots of large objects. Fixes #183
+ * Fix sourceFromsTacktrace to get the right line in Firefox. Shift the 'error' line away in Chrome to get a match.
+ * Fix references to test/deepEqual.js
+ * In autorun mode, moduleDone is called without matching moduleStart. Fix issue #184
+ * Fixture test: allow anything falsy in test as getAttribute in oldIE will return empty string instead of null. We don't really care.
+ * Keep label and checkbox together ( http://i.imgur.com/5Wk3A.png )
+ * Add readme for themes
+ * Fix bad global in reset()
+ * Some cleanup in theme addons
+ * Update headers
+ * Update nv.html, add gabe theme based on https://github.com/jquery/qunit/pull/188
+ * Experiemental custom theme based on https://github.com/jquery/qunit/pull/62 by NV
+ * Replace deprecated same and equals aliases with placeholders that just throw errors, providing a hint at what to use instead. Rename test file to match that.
+ * Can't rely on outerHTML for Firefox < 11. Use cloneNode instead.
+ * Merge remote branch 'conzett/master'
+ * Cleanup whitespace
+ * Update sessionStorage support test to latest version from Modernizr, trying to setItem to avoid QUOTA_EXCEEDED_EXCEPTION
+ * Change fixture reset behavior
+ * Merge pull request #181 from simonz/development
+ * Escaping test names
+ * Show exception stack when test failed
+
+1.2.0 / 2011-11-24
+==================
+
+ * remove uses of equals(), as it's deprecated in favor of equal()
+ * Code review of "Allow objects with no prototype to be tested against object literals."
+ * Allow objects with no prototype to tested against object literals.
+ * Fix IE8 "Member not found" error
+ * Using node-qunit port, the start/stop function are not exposed so we need to prefix any call to them with 'QUnit'. Aka: start() -> QUnit.start()
+ * Remove the 'let teardown clean up globals test' - IE<9 doesn't support (==buggy) deleting window properties, and that's not worth the trouble, as everything else passes just fine. Fixes #155
+ * Fix globals in test.js, part 2
+ * Fix globals in test.js. ?tell wwalser to use ?noglobals everyonce in a while
+ * Extend readme regarding release process
+
+1.1.0 / 2011-10-11
+==================
+
+ * Fixes #134 - Add a window.onerror handler. Makes uncaught errors actually fail the testsuite, instead of going by unnoticed.
+ * Whitespace cleanup
+ * Merge remote branch 'trevorparscal/master'
+ * Fixed IE compatibility issues with using toString on NodeList objects, which in some browsers results in [object Object] rather than [object NodeList]. Now using duck typing for NodeList objects based on the presence of length, length being a number, presence of item method (which will be typeof string in IE and function in others, so we just check that it's not undefined) and that item(0) returns the same value as [0], unless it's empty, in which case item(0) will return 0, while [0] would return undefined. Tested in IE6, IE8, Firefox 6, Safari 5 and Chrome 16.
+ * Update readme with basic notes on releases
+ * More whitespace/parens cleanup
+ * Check if setTimeout is available before trying to delay running the next task. Fixes #160
+ * Whitespace/formatting fix, remove unnecessary parens
+ * Use alias for Object.prototype.toString
+ * Merge remote branch 'trevorparscal/master'
+ * Merge remote branch 'wwalser/recursionBug'
+ * Default 'expected' to null in asyncTest(), same as in test() itself.
+ * Whitespace cleanup
+ * Merge remote branch 'mmchaney/master'
+ * Merge remote branch 'Krinkle/master'
+ * Using === instead of ==
+ * Added more strict array type detection for dump output, and allowed NodeList objects to be output as arrays
+ * Fixes a bug where after an async test, assertions could move between test cases because of internal state (config.current) being incorrectly set
+ * Simplified check for assertion count and adjusted whitespace
+ * Redo of fixing issue #156 (Support Object.prototype extending environment). * QUnit.diff: Throws exception without this if Object.prototype is set (Property 'length' of undefined. Since Object.prototype.foo doesn't have a property 'rows') * QUnit.url: Without this fix, if Object.prototype.foo is set, the url will be set to ?foo=...&the=rest. * saveGlobals: Without this fix, whenever a member is added to Object.prototype, saveGlobals will think it was a global variable in this loop. --- This time using the call method instead of obj.hasOwnProperty(key), which may fail if the object has that as it's own property (touché!).
+ * Handle expect(0) as expected, i.e. expect(0); ok(true, foo); will cause a test to fail
+
+1.0.0 / 2011-10-06
+==================
+
+ * Make QUnit work with TestSwarm
+ * Run other addons tests as composite addon demo. Need to move that to /test folder once this setup actually works
+ * Add-on: New assertion-type: step()
+ * added parameter to start and stop allowing a user to increment/decrement the semaphore more than once per call
+ * Update readmes with .md extension for GitHub to render them as markdown
+ * Update close-enough addon to include readme and match (new) naming convetions
+ * Merge remote branch 'righi/close-enough-addon'
+ * Canvas addon: Update file referneces
+ * Update canvas addon: Rename files and add README
+ * Merge remote branch 'wwalser/composite'
+ * Fix #142 - Backslash characters in messages should not be escaped
+ * Add module name to testStart and testDone callbacks
+ * Removed extra columns in object literals. Closes #153
+ * Remove dead links in comments.
+ * Merge remote branch 'wwalser/multipleCallbacks'
+ * Fixed syntax error and CommonJS incompatibilities in package.json
+ * Allow multiple callbacks to be registered.
+ * Add placeholder for when Safari may end up providing useful error handling
+ * changed file names to match addon naming convention
+ * Whitespace
+ * Created the composite addon.
+ * Using array and object literals.
+ * Issue #140: Make toggle system configurable.
+ * Merge remote branch 'tweetdeck/master'
+ * Adds the 'close enough' addon to determine if numbers are acceptably close enough in value.
+ * Fix recursion support in jsDump, along with tests. Fixes #63 and #100
+ * Adding a QUnit.config.altertitle flag which will allow users to opt-out of the functionality introduced in 60147ca0164e3d810b8a9bf46981c3d9cc569efc
+ * Refactor window.load handler into QUnit.load, makes it possible to call it manually.
+ * More whitespace cleanup
+ * Merge remote branch 'erikvold/one-chk-in-title'
+ * Whitespace
+ * Merge remote branch 'wwalser/syncStopCalls'
+ * Introducing the first QUnit addon, based on https://github.com/jquery/qunit/pull/84 - adds QUnit.pixelEqual assertion method, along with example tests.
+ * Remove config.hidepassed setting in test.js, wasn't intended to land in master.
+ * Expose QUnit.config.hidepassed setting. Overrides sessionStorage and enables enabling the feature programmatically. Fixes #133
+ * Fix formatting (css whitespace) for tracebacks.
+ * Expose extend, id, and addEvent methods.
+ * minor comment typo correction
+ * Ignore Eclipse WTP .settings
+ * Set 'The jQuery Project' as author in package.json
+ * Fixes a bug where synchronous calls to stop would cause tests to end before start was called again
+ * Point to planning testing wiki in readme
+ * only add one checkmark to the document.title
+ * Escape the stacktrace output before setting it as innerHTML, since it tends to contain `<` and `>` characters.
+ * Cleanup whitespace
+ * Run module.teardown before checking for pollution. Fixes #109 - noglobals should run after module teardown
+ * Fix accidental global variable "not"
+ * Update document.title status to use more robust unicode escape sequences, works even when served with non-utf-8-charset.
+ * Modify document.title when suite is done to show success/failure in tab, allows you to see the overall result without seeing the tab content.
+ * Merge pull request #107 from sexyprout/master
+ * Set a generic font
+ * Add/update headers
+ * Drop support for deprecated #main in favor of #qunit-fixture. If this breaks your testsuite, replace id="main" with id="qunit-fixture". Fixes #103
+ * Remove the same key as the one being set. Partial fix for #101
+ * Don't modify expected-count when checking pollution. The failing assertion isn't expected, so shouldn't be counted. And if expect wasn't used, the count is misleading.
+ * Fix order of noglobals check to produce correct introduced/delete error messages
+ * Prepend module name to sessionStorage keys to avoid conflicts
+ * Store filter-tests only when checked
+ * Write to sessionStorage only bad tests
+ * Moved QUnit.url() defintion after QUnit properties are merged into the global scope. Fixes #93 - QUnit url/extend function breaking urls in jQuery ajax test component
+ * Add a "Rerun" link to each test to replce the dblclick (still supported, for now).
+ * Fixed the regex for parsing the name of a test when double clicking to filter.
+ * Merge remote branch 'scottgonzalez/url'
+ * Added checkboxes to show which flags are currently on and allow toggling them.
+ * Retain all querystring parameters when filtering a test via double click.
+ * Added better querystring parsing. Now storing all querystring params in QUnit.urlParams so that we can carry the params forward when filtering to a specific test. This removes the ability to specify multiple filters.
+ * Make reordering optional (QUnit.config.reorder = false) and optimize "Hide passed tests" mode by also hiding "Running [testname]" entries.
+ * Added missing semicolons and wrapped undefined key in quotes.
+ * Optimize test hiding, add class on page load if stored in sessionStorage
+ * Optimize the hiding of passed tests.
+ * Position test results above test list, making it visible without ever having to scroll. Create a placeholder to avoid pushing down results later.
+ * Don't check for existing qunit-testresult element, it gets killed on init anyway.
+ * Added URL flag ?notrycatch (ala ?noglobals) for debugging exceptions. Won't try/catch test code, giving better debugging changes on the original exceptions. Fixes #72
+ * Always show quni-toolbar (if at all specified), persist checkbox via sessionStorage. Fixes #47
+ * Use non-html testname for calls to fail(). Fixes #77
+ * Overhaul of QUnit.callbacks. Consistent single argument with related properties, with additonal runtime property for QUnit.done
+ * Extended test/logs.html to capture more of the callbacks.
+ * Fixed moduleStart/Done callbacks. Added test/logs.html to test these callbacks. To be extended.
+ * Update copyright and license header. Fixes #61
+ * Formatting fix.
+ * Use a semaphore to synchronize stop() and start() calls. Fixes #76
+ * Merge branch 'master' of https://github.com/paulirish/qunit into paulirish-master
+ * Added two tests for previous QUnit.raises behaviour. For #69
+ * add optional 2. arg to QUnit.raises #69.
+ * fix references inside Complex Instances Nesting to what was originally intended.
+ * Qualify calls to ok() in raises() for compability with CLI enviroments.
+ * Fix done() handling, check for blocking, not block property
+ * Fix moduleStart/Done and done callbacks.
+ * Replacing sessionStorage test with the one from Modernizr/master (instead of current release). Here's hoping it'll work for some time.
+ * Updated test for availibility of sessionStorage, based on test from Modernizr. Fixes #64
+ * Defer test execution when previous run passed, persisted via sessionStorage. Fixes #49
+ * Refactored module handling and queuing to enable selective defer of test runs.
+ * Move assertions property from config to Test
+ * Move expected-tests property from config to Test
+ * Refactored test() method to delegate to a Test object to encapsulate all properties and methods of a single test, allowing further modifications.
+ * Adding output of sourcefile and linenumber of failed assertions (except ok()). Only limited cross-browser support for now. Fixes #60
+ * Drop 'hide missing tests' feature. Fixes #48
+ * Adding readme. Fixes #58
+ * Merge branch 'prettydiff'
+ * Improve jsDump output with formatted diffs.
+ * Cleanup whitespace
+ * Cleanup whitespace
+ * Added additional guards around browser specific code and cleaned up jsDump code
+ * Added guards around tests which are only for browsers
+ * cleaned up setTimeout undefined checking and double done on test finish
+ * fixing .gitignore
+ * making window setTimeout query more consistent
+ * Moved expect-code back to beginning of function, where it belongs. Fixes #52
+ * Bread crumb in header: Link to suite without filters, add link to current page based on the filter, if present. Fixes #50
+ * Make the toolbar element optional when checking for show/hide of test results. Fixes #46
+ * Adding headless.html to manually test logging and verify that QUnit works without output elements. Keeping #qunit-fixture as a few tests actually use that.
+ * Fix for QUnit.moduleDone, get rid of initial bogus log. Fixes #33
+ * Pass raw data (result, message, actual, expected) as third argument to QUnit.log. Fixes #32
+ * Dump full exception. Not pretty, but functional (see issue Pretty diff for pretty output). Fixes #31
+ * Don't let QUnit.reset() cause assertions to run. Manually applied from Scott Gonzalez branch. Fixes #34
+ * Added missing semicolons. Fixes #37
+ * Show okay/failed instead of undefined. Fixes #38
+ * Expose push as QUnit.push to build custom assertions. Fixes #39
+ * Respect filter pass selection when writing new results. Fixes #43
+ * Cleanup tests, removing asyncTest-undefined check and formatting
+ * Reset: Fall back to innerHTML when jQuery isn't available. Fixes #44
+ * Merge branch 'master' of github.com:jquery/qunit
+ * reset doesn't exist here - fixes #28.
+ * - less css cruft, better readability - replaced inline style for test counts with "counts" class - test counts now use a "failed"/"passed" vs "pass"/"fail", shorter/more distinct selectors - pulled all test counts styling together and up (they're always the same regardless of section pass/fail state)
+ * Adding .gitignore file
+ * Removing diff test - diffing works fine, as the browser collapses whitespace in its output, but the test can't do that and isn't worth fixing.
+ * Always synchronize the done-step (it'll set the timeout when necessary), fixes timing race conditions.
+ * Insert location.href as an anchor around the header. Fixes issue #29
+ * - kill double ;; in escapeHtml. oops
+ * Removed html escaping from QUnit.diff, as input is already escaped, only leads to double escaping. Replaced newlines with single whitespace.
+ * Optimized and cleaned up CSS file
+ * Making the reset-method non-global (only module, test and assertions should be global), and fixing the fixture reset by using jQuery's html() method again, doesn't work with innerHTML, yet
+ * Introducing #qunit-fixture element, deprecating the (never documented) #main element. Doesn't require inline styles and is now independent of jQuery.
+ * Ammending previous commit: Remove jQuery-core specific resets (will be replaced within jQuery testsuite). Fixes issue #19 - QUnit.reset() removes global jQuery ajax event handlers
+ * Remove jQuery-core specific resets (will be replaced within jQuery testsuite). Fixes issue #19 - QUnit.reset() removes global jQuery ajax event handlers
+ * Cleaning up rubble from the previous commit.
+ * Added raises assertion, reusing some of kennsnyder's code.
+ * Merged kensnyder's object detection code. Original message: Streamlined object detection and exposed QUnit.objectType as a function.
+ * Fixed some bad formatting.
+ * Move various QUnit properties below the globals-export to avoid init becoming a global method. Fixes issue #11 - Remove 'init' function from a global namespace
+ * Improved output when expected != actual: Output both only then, and add a diff. Fixes issue #10 - Show diff if equal() or deepEqual() failed
+ * Expand failed tests on load. Fixes issue #8 - Failed tests expanded on load
+ * Set location.search for url-filtering instead of location.href. Fixes issue #7 - Modify location.search instead of location.href on test double-click
+ * Add QUnit.begin() callback. Fixes issue #6 - Add 'start' callback.
+ * add css style for result (".test-actual") in passed tests
+ * Fixed output escaping by using leeoniya's custom escaping along with innerHTML. Also paves the way for outputting diffs.
+ * Cleanup
+ * Revert "Revert part of bad merge, back to using createTextNode"
+ * Revert part of bad merge, back to using createTextNode
+ * Fixed doubleclick-handler and filtering to rerun only a single test.
+ * Add ability to css style a test's messages, expected and actual results. Merged from Leon Sorokin (leeoniya).
+ * Remove space between module name and colon
+ * - removed "module" wording from reports (unneeded and cluttery) - added and modified css to make module & test names styleable
+ * Logging support for Each test can extend the module testEnvironment
+ * Fixing whitespace
+ * Update tests to use equal() and deepEqual() rather than the deprecated equals() and same()
+ * Consistent argument names for deepEqual
+ * Skip DOM part of jsDump test if using a SSJS environment without a DOM
+ * Improve async testing by creating the result element before running the test, updating it later. If the test fails, its clear which test is the culprit.
+ * Add autostart option to config. Set via QUnit.config.autostart = false; start later via QUnit.start()
+ * Expose QUnit.config, but don't make config a global
+ * Expose QUnit.config as global to make external workarounds easier
+ * Merge branch 'asyncsetup'
+ * Allowing async setup and teardown. Fixes http://github.com/jquery/qunit/issues#issue/20
+ * Always output expected and actual result (no reason not to). Fixes http://github.com/jquery/qunit/issues#issue/21
+ * More changes to the detection of types in jsDump's typeOf.
+ * Change the typeOf checks in QUnit to be more accurate.
+ * Added test for jsDump and modified its options to properly output results when document.createTextNode is used; currently tests for DOM elements cause a stackoverflow error in IEs, works fine, with the correct output, elsewhere
+ * Always use jsDump to output result objects into messages, making the output for passing assertions more useful
+ * Make it so that the display is updated, at least, once a second - also prevents scripts from executing for too long and causing problems.
+ * added tests and patch for qunit.equiv to avoid circular references in objects and arrays
+ * No reason to continue looping, we can stop at this point. Thanks to Chris Thatcher for the suggestion.
+ * Use createTextNode instead of innerHTML for showing test result since expected and actual might be something that looks like a tag.
+ * 'Test card' design added
+ * switched green to blue for top-level pass + reduced padding
+ * Bringing the QUnit API in line with the CommonJS API.
+ * Explicitly set list-style-position: inside on result LIs.
+ * Madness with border-radius.
+ * Corrected banner styles for new class names
+ * Added rounded corners and removed body rules for embedded tests
+ * Resolving merge conflicts.
+ * added colouring for value summary
+ * adding some extra text colours
+ * added styles for toolbar
+ * added new styles
+ * IE 6 and 7 weren't respecting the CSS rules for the banner, used a different technique instead.
+ * Went a bit further and made extra-sure that the target was specified correctly.
+ * Fixed problem where double-clicking an entry in IE caused an error to occur.
+ * Path for http://dev.jquery.com/ticket/5426 - fix the microformat test result
+ * Fixed test() to use 'expected' 2nd param
+ * Remove the named function expressions, to stop Safari 2 from freaking out. Fixes #5.
+ * Each test can extend the module testEnvironment
+ * Extra test for current test environment
+ * Make the current testEnvironment available to utility functions
+ * typeOf in QUnit.jsDump now uses QUnit.is
+ * hoozit in QUnit.equiv now uses QUnit.is
+ * Properly set label attributes.
+ * Some minor tweaks to RyanS' GETParams change.
+ * left a console.log in :(
+ * Took into account a fringe case when using qunit with testswarm. Trying to run all the tests with the extra url params from testswarm would make qunit look for a testsuite that did not exist
+ * need to set config.currentModule to have correct names and working filters
+ * Support logging of testEnvironment
+ * async tests aren't possible on rhino
+ * Fixed a missing QUnit.reset().
+ * The QUnit. prefix was missing from the uses of the start() method.
+ * Merged lifecycle object into testEnvironment
+ * "replacing totally wrong diff algorithm with a working one" Patch from kassens (manually applied).
+ * fixing jslint errors in test.js
+ * Fixed: testDone() was always called with 0 failures in CommonJS mode
+ * Fixed: moduleDone() was invoked on first call to module()
+ * Added a new asyncTest method - removes the need for having to call start() at the beginning of an asynchronous test.
+ * Added support for expected numbers in the test method.
+ * Fixed broken dynamic loading of tests (can now dynamically load tests and done still works properly).
+ * Simplified the logic for calling 'done' and pushing off new tests - was causing too many inconsistencies otherwise.
+ * Simplified the markup for the QUnit test test suite.
+ * Realized that it's really easy to handle the case where stop() has been called and then an exception is thrown.
+ * Added in better logging support. Now handle moduleStart/moduleDone and testStart/testDone. Also make sure that done only fires once at the end.
+ * Made it so that you can reset the suite to an initial state (at which point tests can be dynamically loaded and run, for example).
+ * Re-worked QUnit to handle dynamic loading of additional code (the 'done' code will be re-run after additional code is loaded).
+ * Removed the old SVN version stuff.
+ * Moved the QUnit source into a separate directory and updated the test suite/packages files.
+ * Added in CommonJS support for exporting the QUnit functionality.
+ * Missing quote from package.json.
+ * Fixed trailing comma in package.json.
+ * Added a CommonJS/Narwhal package.json file.
+ * Accidentally reverted the jsDump/equiv changes that had been made.
+ * Hide the filter toolbar if it's not needed. Also exposed the jsDump and equiv objects on QUnit.
+ * Retooled the QUnit CSS to be more generic.
+ * Renamed the QUnit files from testrunner/testsuite to QUnit.
+ * Expose QUnit.equiv and QUnit.jsDump in QUnit.
+ * Moved the QUnit test directory into the QUnit directory.
+ * Reworked the QUnit CSS (moved jQuery-specific stuff out, made all the other selectors more specific).
+ * Removed the #main reset for non-jQuery code (QUnit.reset can be overwritten with your own reset code).
+ * Moved the QUnit toolbar inline.
+ * Switched to using a qunit- prefix for special elements (banner, userAgent, and tests).
+ * Missed a case in QUnit where an element was assumed to exist.
+ * QUnit's isSet and isObj are no longer needed - you should use same instead.
+ * Make sure that QUnit's equiv entity escaping is enabled by default (otherwise the output gets kind of crazy).
+ * Refactored QUnit, completely reorganized the structure of the file. Additionally made it so that QUnit can run outside of a browser (inside Rhino, for example).
+ * Removed some legacy and jQuery-specific test methods.
+ * Added callbacks for tests and modules. It's now possible to reproduce the full display of the testrunner without using the regular rendering.
+ * QUnit no longer depends upon rendering the results (it can work simply by using the logging callbacks).
+ * Made QUnit no longer require jQuery (it is now a standalone, framework independent, test runner).
+ * Reverted the noglobals changed from QUnit - causing chaos in the jQuery test suite.
+ * qunit: removed noglobals flag, instead always check for globals after teardown; if a test has to introduce a global "myVar", use delete window.myVar in teardown or at the end of a test
+ * qunit: don't child selectors when IE should behave nicely, too
+ * qunit: improvment for the test-scope: create a new object and call setup, the test, and teardown in the scope of that object - allows you to provide test fixtures to each test without messing with global data; kudos to Martin Häcker for the contribution
+ * qunit: added missing semicolons
+ * qunit: fixed a semicolon, that should have been a comma
+ * QUnit: implemented error handling for Opera as proposed by #3628
+ * qunit: fix for http://dev.jquery.com/ticket/3215 changing wording of testresults, to something more positive (x of y passed, z failed)
+ * QUnit: testrunner.js: Ensures equality of types (String, Boolean, Number) declared with the 'new' prefix. See comments #3, #4 and #5 on http://philrathe.com/articles/equiv
+ * qunit: wrap name of test in span when a module is used for better styling
+ * qunit: auto-prepend default mark (#header, #banner, #userAgent, #tests) when not present
+ * Landing some changes to add logging to QUnit (so that it's easier to hook in to when a test finishes).
+ * Added checkbox for hiding missing tests (tests that fail with the text 'missing test - untested code is broken code')
+ * qunit: eol-style:native and mime-type
+ * HTML being injected for the test result wasn't valid HTML.
+ * qunit: setting mimetype for testsuite.css
+ * qunit: update to Ariel's noglobals patch to support async tests as well
+ * Landing Ariel's change - checks for global variable leakage.
+ * qunit: run module-teardown in its own synchronize block to synchronize with async tests (ugh)
+ * qunit: same: equiv - completely refactored in the testrunner.
+ * testrunner.js: - Update equiv to support Date and RegExp. - Change behavior when comparing function: - abort when in an instance of Object (when references comparison failed) - skip otherwise (like before)
+ * qunit: code refactoring and cleanup
+ * QUnit: update equiv to latest version, handling multiple arguments and NaN, see http://philrathe.com/articles/equiv
+ * QUnit: cleanup, deprecating compare, compare2 and serialArray: usage now throws an error with a helpful message
+ * QUnit: optional timeout argument for stop, while making tests undetermined, useful for debugging
+ * QUnit: added toolbar with "hide passed tests" checkbox to help focus on failed tests
+ * QUnit: minor output formatting
+ * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests
+ * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests
+ * QUnit: adding same-assertion for a recursive comparsion of primite values, arrays and objects, thanks to Philippe Rathé for the contribution, including tests
+ * qunit: use window.load to initialize tests, allowing other code to run on document-ready before starting to run tests
+ * qunit: allow either setup or teardown, instead of both or nothing
+ * qunit: make everything private by default, expose only public API; removed old timeout-option (non-deterministic, disabled for a long time anyway); use local $ reference instead of global jQuery reference; minor code cleanup (var config instead of _config; queue.shift instead of slice)
+ * qunit: added support for module level setup/teardown callbacks
+ * qunit: modified example for equals to avoid confusion with parameter ordering
+ * qunit: added id/classes to result element to enable integration with browser automation tools, see http://docs.jquery.com/QUnit#Integration_into_Browser_Automation_Tools
+ * qunit: replaced $ alias with jQuery (merged from jquery/test/data/testrunner.js)
+ * qunit: fixed inline documentation for equals
+ * qunit testrunner - catch and log possible error during reset()
+ * QUnit: Switched out Date and Rev for Id.
+ * qunit: when errors are thrown in a test, the message is successfully show on all browsers.
+ * qunit: added license header
+ * qunit: moved jquery testrunner to top-level project, see http://docs.jquery.com/QUnit
+ * Share project 'qunit' into 'https://jqueryjs.googlecode.com/svn'
View
62 libraries/qunit/README.md
@@ -0,0 +1,62 @@
+[QUnit](http://qunitjs.com) - A JavaScript Unit Testing framework.
+================================
+
+QUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery
+project to test its code and plugins but is capable of testing any generic
+JavaScript code (and even capable of testing JavaScript code on the server-side).
+
+QUnit is especially useful for regression testing: Whenever a bug is reported,
+write a test that asserts the existence of that particular bug. Then fix it and
+commit both. Every time you work on the code again, run the tests. If the bug
+comes up again - a regression - you'll spot it immediately and know how to fix
+it, because you know what code you just changed.
+
+Having good unit test coverage makes safe refactoring easy and cheap. You can
+run the tests after each small refactoring step and always know what change
+broke something.
+
+QUnit is similar to other unit testing frameworks like JUnit, but makes use of
+the features JavaScript provides and helps with testing code in the browser, e.g.
+with its stop/start facilities for testing asynchronous code.
+
+If you are interested in helping developing QUnit, you are in the right place.
+For related discussions, visit the
+[QUnit and Testing forum](http://forum.jquery.com/qunit-and-testing).
+
+Development
+-----------
+
+To submit patches, fork the repository, create a branch for the change. Then implement
+the change, run `grunt` to lint and test it, then commit, push and create a pull request.
+
+Include some background for the change in the commit message and `Fixes #nnn`, referring
+to the issue number you're addressing.
+
+To run `grunt`, you need `node` and `npm`, then `npm install grunt -g`. That gives you a global
+grunt binary. For additional grunt tasks, also run `npm install`.
+
+Releases
+--------
+
+Install git-extras and run `git changelog` to update History.md.
+Update qunit/qunit.js|css and package.json to the release version, commit and
+tag, update them again to the next version, commit and push commits and tags
+(`git push --tags origin master`).
+
+Put the 'v' in front of the tag, e.g. `v1.8.0`. Clean up the changelog, removing merge commits
+or whitespace cleanups.
+
+To upload to code.jquery.com (replace $version accordingly), ssh to code.origin.jquery.com:
+
+ cp qunit/qunit.js /var/www/html/code.jquery.com/qunit/qunit-$version.js
+ cp qunit/qunit.css /var/www/html/code.jquery.com/qunit/qunit-$version.css
+
+Then update /var/www/html/code.jquery.com/index.html and purge it with:
+
+ curl -s http://code.origin.jquery.com/?reload
+
+Update web-base-template to link to those files for qunitjs.com.
+
+Publish to npm via
+
+ npm publish
View
24 libraries/qunit/addons/.jshintrc
@@ -0,0 +1,24 @@
+{
+ "browser": true,
+ "curly": true,
+ "eqnull": true,
+ "eqeqeq": true,
+ "expr": true,
+ "evil": true,
+ "jquery": true,
+ "latedef": true,
+ "noarg": true,
+ "onevar": true,
+ "smarttabs": true,
+ "trailing": true,
+ "undef": true,
+ "predef": [
+ "module",
+ "test",
+ "asyncTest",
+ "expect",
+ "start",
+ "stop",
+ "QUnit"
+ ]
+}
View
17 libraries/qunit/addons/canvas/README.md
@@ -0,0 +1,17 @@
+Canvas - A QUnit addon for testing Canvas rendering
+================================
+
+This addon for QUnit adds a `QUnit.pixelEqual` method that allows you to assert
+individual pixel values in a given canvas.
+
+### Usage ###
+
+```js
+QUnit.pixelEqual(canvas, x, y, r, g, b, a, message);
+```
+
+Where:
+ - `canvas`: Reference to a canvas element
+ - `x`, `y`: Coordinates of the pixel to test
+ - `r`, `g`, `b`, `a`: The color and opacity value of the pixel that you except
+ - `message`: Optional message, same as for other assertions
View
76 libraries/qunit/addons/canvas/canvas-test.js
@@ -0,0 +1,76 @@
+test("Canvas pixels", function () {
+ var canvas = document.getElementById('qunit-canvas'), context;
+ try {
+ context = canvas.getContext('2d');
+ } catch(e) {
+ // propably no canvas support, just exit
+ return;
+ }
+ context.fillStyle = 'rgba(0, 0, 0, 0)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(255, 0, 0, 0)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 255, 0, 0)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 0, 255, 0)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
+ context.clearRect(0,0,5,5);
+
+ context.fillStyle = 'rgba(0, 0, 0, 0.6)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 153);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(255, 0, 0, 0.6)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 255, 0, 0, 153);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 255, 0, 0.6)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 255, 0, 153);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 0, 255, 0.6)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 0, 0, 0, 0, 255, 153);
+ context.clearRect(0,0,5,5);
+
+ context.fillStyle = 'rgba(0, 0, 0, 0.6)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 2, 2, 0, 0, 0, 153);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(255, 0, 0, 0.6)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 2, 2, 255, 0, 0, 153);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 255, 0, 0.6)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 2, 2, 0, 255, 0, 153);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 0, 255, 0.6)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 2, 2, 0, 0, 255, 153);
+ context.clearRect(0,0,5,5);
+
+ context.fillStyle = 'rgba(0, 0, 0, 1)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 4, 4, 0, 0, 0, 255);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(255, 0, 0, 1)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 4, 4, 255, 0, 0, 255);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 255, 0, 1)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 4, 4, 0, 255, 0, 255);
+ context.clearRect(0,0,5,5);
+ context.fillStyle = 'rgba(0, 0, 255, 1)';
+ context.fillRect(0, 0, 5, 5);
+ QUnit.pixelEqual(canvas, 4, 4, 0, 0, 255, 255);
+ context.clearRect(0,0,5,5);
+});
View
15 libraries/qunit/addons/canvas/canvas.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>QUnit Test Suite - Canvas Addon</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="qunit-canvas.js"></script>
+ <script src="canvas-test.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <canvas id="qunit-canvas" width="5" height="5"></canvas>
+</body>
+</html>
View
6 libraries/qunit/addons/canvas/qunit-canvas.js
@@ -0,0 +1,6 @@
+QUnit.extend( QUnit, {
+ pixelEqual: function(canvas, x, y, r, g, b, a, message) {
+ var actual = Array.prototype.slice.apply(canvas.getContext('2d').getImageData(x, y, 1, 1).data), expected = [r, g, b, a];
+ QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
+ }
+});
View
18 libraries/qunit/addons/close-enough/README.md
@@ -0,0 +1,18 @@
+Close-Enough - A QUnit addon for testing number approximations
+================================
+
+This addon for QUnit adds `QUnit.close` and `QUnit.notClose` assertion methods to test that
+numbers are close enough (or different enough) from an expected number, with
+a specified accuracy.
+
+### Usage ###
+
+```js
+QUnit.close(actual, expected, maxDifference, message);
+QUnit.notClose(actual, expected, minDifference, message);
+```
+
+Where:
+ - `maxDifference`: the maximum inclusive difference allowed between the `actual` and `expected` numbers
+ - `minDifference`: the minimum exclusive difference allowed between the `actual` and `expected` numbers
+ - `actual`, `expected`, `message`: The usual
View
35 libraries/qunit/addons/close-enough/close-enough-test.js
@@ -0,0 +1,35 @@
+test("Close Numbers", function () {
+ var halfPi = Math.PI / 2,
+ sqrt2 = Math.sqrt(2);
+
+ QUnit.close(7, 7, 0);
+ QUnit.close(7, 7.1, 0.1);
+ QUnit.close(7, 7.1, 0.2);
+
+ QUnit.close(3.141, Math.PI, 0.001);
+ QUnit.close(3.1, Math.PI, 0.1);
+
+ QUnit.close(halfPi, 1.57, 0.001);
+
+ QUnit.close(sqrt2, 1.4142, 0.0001);
+
+ QUnit.close(Infinity, Infinity, 1);
+});
+
+test("Distant Numbers", function () {
+ var halfPi = Math.PI / 2,
+ sqrt2 = Math.sqrt(2);
+
+ QUnit.notClose(6, 7, 0);
+ QUnit.notClose(7, 7.2, 0.1);
+ QUnit.notClose(7, 7.2, 0.19999999999);
+
+ QUnit.notClose(3.141, Math.PI, 0.0001);
+ QUnit.notClose(3.1, Math.PI, 0.001);
+
+ QUnit.notClose(halfPi, 1.57, 0.0001);
+
+ QUnit.notClose(sqrt2, 1.4142, 0.00001);
+
+ QUnit.notClose(Infinity, -Infinity, 5);
+});
View
14 libraries/qunit/addons/close-enough/close-enough.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>QUnit Test Suite - Close Enough Addon</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="qunit-close-enough.js"></script>
+ <script src="close-enough-test.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+</body>
+</html>
View
32 libraries/qunit/addons/close-enough/qunit-close-enough.js
@@ -0,0 +1,32 @@
+QUnit.extend( QUnit, {
+ /**
+ * Checks that the first two arguments are equal, or are numbers close enough to be considered equal
+ * based on a specified maximum allowable difference.
+ *
+ * @example close(3.141, Math.PI, 0.001);
+ *
+ * @param Number actual
+ * @param Number expected
+ * @param Number maxDifference (the maximum inclusive difference allowed between the actual and expected numbers)
+ * @param String message (optional)
+ */
+ close: function(actual, expected, maxDifference, message) {
+ var passes = (actual === expected) || Math.abs(actual - expected) <= maxDifference;
+ QUnit.push(passes, actual, expected, message);
+ },
+
+ /**
+ * Checks that the first two arguments are numbers with differences greater than the specified
+ * minimum difference.
+ *
+ * @example notClose(3.1, Math.PI, 0.001);
+ *
+ * @param Number actual
+ * @param Number expected
+ * @param Number minDifference (the minimum exclusive difference allowed between the actual and expected numbers)
+ * @param String message (optional)
+ */
+ notClose: function(actual, expected, minDifference, message) {
+ QUnit.push(Math.abs(actual - expected) > minDifference, actual, expected, message);
+ }
+});
View
25 libraries/qunit/addons/composite/README.md
@@ -0,0 +1,25 @@
+Composite - A QUnit addon for running multiple test files
+================================
+
+Composite is a QUnit addon that, when handed an array of files, will
+open each of those files inside of an iframe, run the tests, and
+display the results as a single suite of QUnit tests.
+
+The "Rerun" link next to each suite allows you to quickly rerun that suite,
+outside the composite runner.
+
+If you want to see what assertion failed in a long list of assertions,
+just use the regular "Hide passed tests" checkbox.
+
+### Usage ###
+
+Load QUnit itself as usual _plus_ `qunit-composite.css` and `qunit-composite.js`,
+then specify the test suites to load using `QUnit.testSuites`:
+
+```js
+QUnit.testSuites([
+ "test-file-1.html",
+ "test-file-2.html",
+ "test-file-3.html"
+]);
+```
View
24 libraries/qunit/addons/composite/composite-demo-test.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>QUnit SubsuiteRunner Test Suite</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <link rel="stylesheet" href="qunit-composite.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="qunit-composite.js"></script>
+ <script>
+ QUnit.testSuites([
+ "../../test/index.html",
+ "../canvas/canvas.html",
+ "../close-enough/close-enough.html",
+ "../step/step.html"
+ ]);
+ </script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture">
+</div>
+</body>
+</html>
View
33 libraries/qunit/addons/composite/index.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>Composite</title>
+</head>
+<body>
+ <h1>Composite</h1>
+ <h3>A QUnit Addon For Running Multiple Test Files</h3>
+ <p>Composite is a QUnit addon that, when handed an array of
+ files, will open each of those files inside of an iframe, run
+ the tests and display the results as a single suite of QUnit
+ tests.</p>
+ <h4>Using Composite</h4>
+ <p>To use Composite, setup a standard QUnit html page as you
+ would with other QUnit tests. Remember to include composite.js
+ and composite.css. Then, inside of either an external js file,
+ or a script block call the only new method that Composite
+ exposes, QUnit.testSuites().</p><p>QUnit.testSuites() is
+ passed an array of test files to run as follows:</p>
+ <pre>
+QUnit.testSuites([
+"test-file-1.html",
+"test-file-2.html",
+"test-file-3.html"
+]);
+ </pre>
+ <h4>Tests</h4>
+ <p>
+ <a href="composite-demo-test.html">Composite Demo</a>: A suite which demoes how Composite is bootstrapped and run.
+ </p>
+</body>
+</html>
View
13 libraries/qunit/addons/composite/qunit-composite.css
@@ -0,0 +1,13 @@
+iframe.qunit-subsuite {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+
+ margin: 0;
+ padding: 0;
+ border-width: 1px 0 0;
+ height: 45%;
+ width: 100%;
+
+ background: #fff;
+}
View
105 libraries/qunit/addons/composite/qunit-composite.js
@@ -0,0 +1,105 @@
+(function( QUnit ) {
+
+QUnit.extend( QUnit, {
+ testSuites: function( suites ) {
+ QUnit.begin(function() {
+ QUnit.initIframe();
+ });
+
+ for ( var i = 0; i < suites.length; i++ ) {
+ QUnit.runSuite( suites[i] );
+ }
+
+ QUnit.done(function() {
+ this.iframe.style.display = "none";
+ });
+ },
+
+ runSuite: function( suite ) {
+ asyncTest( suite, function() {
+ QUnit.iframe.setAttribute( "src", suite );
+ });
+ },
+
+ initIframe: function() {
+ var body = document.body,
+ iframe = this.iframe = document.createElement( "iframe" ),
+ iframeWin;
+
+ iframe.className = "qunit-subsuite";
+ body.appendChild( iframe );
+
+ function onIframeLoad() {
+ var module, test,
+ count = 0;
+
+ if (iframe.src === "") {
+ return;
+ }
+
+ iframeWin.QUnit.moduleStart(function( data ) {
+ // capture module name for messages
+ module = data.name;
+ });
+
+ iframeWin.QUnit.testStart(function( data ) {
+ // capture test name for messages
+ test = data.name;
+ });
+ iframeWin.QUnit.testDone(function() {
+ test = null;
+ });
+
+ iframeWin.QUnit.log(function( data ) {
+ if (test === null) {
+ return;
+ }
+ // pass all test details through to the main page
+ var message = module + ": " + test + ": " + data.message;
+ expect( ++count );
+ QUnit.push( data.result, data.actual, data.expected, message );
+ });
+
+ iframeWin.QUnit.done(function() {
+ // start the wrapper test from the main page
+ start();
+ });
+ }
+ QUnit.addEvent( iframe, "load", onIframeLoad );
+
+ iframeWin = iframe.contentWindow;
+ }
+});
+
+QUnit.testStart(function( data ) {
+ // update the test status to show which test suite is running
+ QUnit.id( "qunit-testresult" ).innerHTML = "Running " + data.name + "...<br>&nbsp;";
+});
+
+QUnit.testDone(function() {
+ var i,
+ current = QUnit.id( this.config.current.id ),
+ children = current.children,
+ src = this.iframe.src;
+
+ // undo the auto-expansion of failed tests
+ for ( i = 0; i < children.length; i++ ) {
+ if ( children[i].nodeName === "OL" ) {
+ children[i].style.display = "none";
+ }
+ }
+
+ QUnit.addEvent(current, "dblclick", function( e ) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) {
+ target = target.parentNode;
+ }
+ if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
+ window.location = src;
+ }
+ });
+
+ current.getElementsByTagName('a')[0].href = src;
+});
+
+}( QUnit ) );
View
18 libraries/qunit/addons/junitlogger/README.md
@@ -0,0 +1,18 @@
+JUnit Logger - A QUnit addon for producing JUnit-style XML test reports
+============
+
+A QUnit addon that produces JUnit-style XML test reports for integration into build tools like Jenkins.
+
+### Usage ###
+
+Include the addon script after QUnit itself, then implement the `jUnitReport` hook to do something with the XML string (e.g. upload it to a server):
+
+```js
+QUnit.jUnitReport = function(report) {
+ console.log(report.xml);
+};
+```
+
+### Notes ###
+
+If you're using Grunt, you should take a look at its [qunit task](https://github.com/cowboy/grunt/blob/master/docs/task_qunit.md). Or use [John Bender's grunt-junit plugin](https://github.com/johnbender/grunt-junit) to have the `qunit` task output JUnit-style XML, as this reporter does.
View
44 libraries/qunit/addons/junitlogger/index.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>QUnit Test Suite - JUnit report</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="junitlogger.js"></script>
+ <script>
+ QUnit.jUnitReport = function(data) {
+ console.log(data.xml);
+ };
+
+ module('Module 1');
+
+ test("test 1", 2, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ });
+
+ test("test 2", 3, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ equal(1, 1, "Assert 1 = 1");
+ });
+
+ module('Module 2');
+
+ test("test 3", 2, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ });
+
+ test("test 4", 3, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ equal(1, 3, "Assert fail 1 = 3");
+ });
+ </script>
+</head>
+<body>
+ <div id="qunit"></div>
+</body>
+</html>
View
306 libraries/qunit/addons/junitlogger/junitlogger.js
@@ -0,0 +1,306 @@
+(function() {
+ 'use strict';
+
+ var currentRun, currentModule, currentTest, assertCount;
+
+ // Gets called when a report is generated.
+ QUnit.jUnitReport = function(/* data */) {
+ // Override me!
+ };
+
+ QUnit.begin(function() {
+ currentRun = {
+ modules: [],
+ total: 0,
+ passed: 0,
+ failed: 0,
+ start: new Date(),
+ time: 0
+ };
+ });
+
+ QUnit.moduleStart(function(data) {
+ currentModule = {
+ name: data.name,
+ tests: [],
+ total: 0,
+ passed: 0,
+ failed: 0,
+ start: new Date(),
+ time: 0,
+ stdout: [],
+ stderr: []
+ };
+
+ currentRun.modules.push(currentModule);
+ });
+
+ QUnit.testStart(function(data) {
+ // Setup default module if no module was specified
+ if (!currentModule) {
+ currentModule = {
+ name: data.module || 'default',
+ tests: [],
+ total: 0,
+ passed: 0,
+ failed: 0,
+ start: new Date(),
+ time: 0,
+ stdout: [],
+ stderr: []
+ };
+
+ currentRun.modules.push(currentModule);
+ }
+
+ // Reset the assertion count
+ assertCount = 0;
+
+ currentTest = {
+ name: data.name,
+ failedAssertions: [],
+ total: 0,
+ passed: 0,
+ failed: 0,
+ start: new Date(),
+ time: 0
+ };
+
+ currentModule.tests.push(currentTest);
+ });
+
+ QUnit.log(function(data) {
+ assertCount++;
+
+ // Ignore passing assertions
+ if (!data.result) {
+ currentTest.failedAssertions.push(data);
+
+ // Add log message of failure to make it easier to find in Jenkins CI
+ currentModule.stdout.push('[' + currentModule.name + ', ' + currentTest.name + ', ' + assertCount + '] ' + data.message);
+ }
+ });
+
+ QUnit.testDone(function(data) {
+ currentTest.time = (new Date()).getTime() - currentTest.start.getTime(); // ms
+ currentTest.total = data.total;
+ currentTest.passed = data.passed;
+ currentTest.failed = data.failed;
+
+ currentTest = null;
+ });
+
+ QUnit.moduleDone(function(data) {
+ currentModule.time = (new Date()).getTime() - currentModule.start.getTime(); // ms
+ currentModule.total = data.total;
+ currentModule.passed = data.passed;
+ currentModule.failed = data.failed;
+
+ currentModule = null;
+ });
+
+ QUnit.done(function(data) {
+ currentRun.time = data.runtime || ((new Date()).getTime() - currentRun.start.getTime()); // ms
+ currentRun.total = data.total;
+ currentRun.passed = data.passed;
+ currentRun.failed = data.failed;
+
+ generateReport(data, currentRun);
+ });
+
+ var generateReport = function(results, run) {
+ var pad = function(n) {
+ return n < 10 ? '0' + n : n;
+ };
+
+ var toISODateString = function(d) {
+ return d.getUTCFullYear() + '-' +
+ pad(d.getUTCMonth() + 1)+'-' +
+ pad(d.getUTCDate()) + 'T' +
+ pad(d.getUTCHours()) + ':' +
+ pad(d.getUTCMinutes()) + ':' +
+ pad(d.getUTCSeconds()) + 'Z';
+ };
+
+ var convertMillisToSeconds = function(ms) {
+ return Math.round(ms * 1000) / 1000000;
+ };
+
+ var xmlEncode = function(text) {
+ var baseEntities = {
+ '"' : '&quot;',
+ "'" : '&apos;',
+ '<' : '&lt;',
+ '>' : '&gt;',
+ '&' : '&amp;'
+ };
+
+ return ('' + text).replace(/[<>&\"\']/g, function(chr) {
+ return baseEntities[chr] || chr;
+ });
+ };
+
+ var XmlWriter = function(settings) {
+ settings = settings || {};
+
+ var data = [], stack = [], lineBreakAt;
+
+ var addLineBreak = function(name) {
+ if (lineBreakAt[name] && data[data.length - 1] !== '\n') {
+ data.push('\n');
+ }
+ };
+
+ lineBreakAt = (function(items) {
+ var i, map = {};
+ items = items || [];
+
+ i = items.length;
+ while (i--) {
+ map[items[i]] = {};
+ }
+ return map;
+ })(settings.linebreak_at);
+
+ this.start = function(name, attrs, empty) {
+ if (!empty) {
+ stack.push(name);
+ }
+
+ data.push('<' + name);
+
+ for (var aname in attrs) {
+ data.push(' ' + xmlEncode(aname) + '="' + xmlEncode(attrs[aname]) + '"');
+ }
+
+ data.push(empty ? ' />' : '>');
+ addLineBreak(name);
+ };
+
+ this.end = function() {
+ var name = stack.pop();
+ addLineBreak(name);
+ data.push('</' + name + '>');
+ addLineBreak(name);
+ };
+
+ this.text = function(text) {
+ data.push(xmlEncode(text));
+ };
+
+ this.cdata = function(text) {
+ data.push('<![CDATA[' + text + ']]>');
+ };
+
+ this.comment = function(text) {
+ data.push('<!--' + text + '-->');
+ };
+ this.pi = function(name, text) {
+ data.push('<?' + name + (text ? ' ' + text : '') + '?>\n');
+ };
+
+ this.doctype = function(text) {
+ data.push('<!DOCTYPE' + text + '>\n');
+ };
+
+ this.getString = function() {
+ while (stack.length) {
+ this.end(); // internally calls `stack.pop();`
+ }
+ return data.join('').replace(/\n$/, '');
+ };
+
+ this.reset = function() {
+ data.length = 0;
+ stack.length = 0;
+ };
+
+ // Start by writing the XML declaration
+ this.pi(settings.xmldecl || 'xml version="1.0" encoding="UTF-8"');
+ };
+
+
+ // Generate JUnit XML report!
+ var m, mLen, module, t, tLen, test, a, aLen, assertion, isEmptyElement,
+ xmlWriter = new XmlWriter({
+ linebreak_at: ['testsuites', 'testsuite', 'testcase', 'failure', 'system-out', 'system-err']
+ });
+
+ xmlWriter.start('testsuites', {
+ hostname: 'localhost',
+ tests: run.total,
+ failures: run.failed,
+ errors: 0,
+ time: convertMillisToSeconds(run.time), // ms → sec
+ timestamp: toISODateString(run.start)
+ });
+
+ for (m = 0, mLen = run.modules.length; m < mLen; m++) {
+ module = run.modules[m];
+
+ xmlWriter.start('testsuite', {
+ id: m,
+ name: module.name,
+ hostname: 'localhost',
+ tests: module.total,
+ failures: module.failed,
+ errors: 0,
+ time: convertMillisToSeconds(module.time), // ms → sec
+ timestamp: toISODateString(module.start)
+ });
+
+ for (t = 0, tLen = module.tests.length; t < tLen; t++) {
+ test = module.tests[t];
+
+ xmlWriter.start('testcase', {
+ name: test.name,
+ tests: test.total,
+ failures: test.failed,
+ errors: 0,
+ time: convertMillisToSeconds(test.time), // ms → sec
+ timestamp: toISODateString(test.start)
+ });
+
+ for (a = 0, aLen = test.failedAssertions.length; a < aLen; a++) {
+ assertion = test.failedAssertions[a];
+
+ isEmptyElement = assertion && !(assertion.actual && assertion.expected);
+ xmlWriter.start('failure', { type: 'AssertionFailedError', message: assertion.message }, isEmptyElement);
+ if (!isEmptyElement) {
+ xmlWriter.start('actual', { value: assertion.actual }, true);
+ xmlWriter.start('expected', { value: assertion.expected }, true);
+ xmlWriter.end(); //'failure'
+ }
+ }
+
+ xmlWriter.end(); //'testcase'
+ }
+
+ // Per-module stdout
+ if (module.stdout && module.stdout.length) {
+ xmlWriter.start('system-out');
+ xmlWriter.cdata('\n' + module.stdout.join('\n') + '\n');
+ xmlWriter.end(); //'system-out'
+ }
+
+ // Per-module stderr
+ if (module.stderr && module.stderr.length) {
+ xmlWriter.start('system-err');
+ xmlWriter.cdata('\n' + module.stderr.join('\n') + '\n');
+ xmlWriter.end(); //'system-err'
+ }
+
+ xmlWriter.end(); //'testsuite'
+ }
+
+ xmlWriter.end(); //'testsuites'
+
+
+ // Invoke the user-defined callback
+ QUnit.jUnitReport({
+ results: results,
+ xml: xmlWriter.getString()
+ });
+ };
+
+})();
View
16 libraries/qunit/addons/phantomjs/README.md
@@ -0,0 +1,16 @@
+# PhantomJS Runner #
+A PhantomJS-powered headless test runner, providing basic console output for QUnit tests.
+
+### Usage ###
+```bash
+ phantomjs runner.js [url-of-your-qunit-testsuite]
+```
+
+### Example ###
+```bash
+ phantomjs runner.js http://localhost/qunit/test/index.html
+```
+
+### Notes ###
+ - Requires [PhantomJS](http://phantomjs.org/) 1.6+ (1.7+ recommended).
+ - If you're using Grunt, you should take a look at its [qunit task](https://github.com/gruntjs/grunt/blob/master/docs/task_qunit.md).
View
127 libraries/qunit/addons/phantomjs/runner.js
@@ -0,0 +1,127 @@
+/*
+ * QtWebKit-powered headless test runner using PhantomJS
+ *
+ * PhantomJS binaries: http://phantomjs.org/download.html
+ * Requires PhantomJS 1.6+ (1.7+ recommended)
+ *
+ * Run with:
+ * phantomjs runner.js [url-of-your-qunit-testsuite]
+ *
+ * e.g.
+ * phantomjs runner.js http://localhost/qunit/test/index.html
+ */
+
+/*jshint latedef:false */
+/*global phantom:false, require:false, console:false, window:false, QUnit:false */
+
+(function() {
+ 'use strict';
+
+ var args = require('system').args;
+
+ // arg[0]: scriptName, args[1...]: arguments
+ if (args.length !== 2) {
+ console.error('Usage:\n phantomjs runner.js [url-of-your-qunit-testsuite]');
+ phantom.exit(1);
+ }
+
+ var url = args[1],
+ page = require('webpage').create();
+
+ // Route `console.log()` calls from within the Page context to the main Phantom context (i.e. current `this`)
+ page.onConsoleMessage = function(msg) {
+ console.log(msg);
+ };
+
+ page.onInitialized = function() {
+ page.evaluate(addLogging);
+ };
+
+ page.onCallback = function(message) {
+ var result,
+ failed;
+
+ if (message) {
+ if (message.name === 'QUnit.done') {
+ result = message.data;
+ failed = !result || result.failed;
+
+ phantom.exit(failed ? 1 : 0);
+ }
+ }
+ };
+
+ page.open(url, function(status) {
+ if (status !== 'success') {
+ console.error('Unable to access network: ' + status);
+ phantom.exit(1);
+ } else {
+ // Cannot do this verification with the 'DOMContentLoaded' handler because it
+ // will be too late to attach it if a page does not have any script tags.
+ var qunitMissing = page.evaluate(function() { return (typeof QUnit === 'undefined' || !QUnit); });
+ if (qunitMissing) {
+ console.error('The `QUnit` object is not present on this page.');
+ phantom.exit(1);
+ }
+
+ // Do nothing... the callback mechanism will handle everything!
+ }
+ });
+
+ function addLogging() {
+ window.document.addEventListener('DOMContentLoaded', function() {
+ var current_test_assertions = [];
+
+ QUnit.log(function(details) {
+ var response;
+
+ // Ignore passing assertions
+ if (details.result) {
+ return;
+ }
+
+ response = details.message || '';
+
+ if (typeof details.expected !== 'undefined') {
+ if (response) {
+ response += ', ';
+ }
+
+ response += 'expected: ' + details.expected + ', but was: ' + details.actual;
+ if (details.source) {
+ response += "\n" + details.source;
+ }
+ }
+
+ current_test_assertions.push('Failed assertion: ' + response);
+ });
+
+ QUnit.testDone(function(result) {
+ var i,
+ len,
+ name = result.module + ': ' + result.name;
+
+ if (result.failed) {
+ console.log('Test failed: ' + name);
+
+ for (i = 0, len = current_test_assertions.length; i < len; i++) {
+ console.log(' ' + current_test_assertions[i]);
+ }
+ }
+
+ current_test_assertions.length = 0;
+ });
+
+ QUnit.done(function(result) {
+ console.log('Took ' + result.runtime + 'ms to run ' + result.total + ' tests. ' + result.passed + ' passed, ' + result.failed + ' failed.');
+
+ if (typeof window.callPhantom === 'function') {
+ window.callPhantom({
+ 'name': 'QUnit.done',
+ 'data': result
+ });
+ }
+ });
+ }, false);
+ }
+})();
View
20 libraries/qunit/addons/step/README.md
@@ -0,0 +1,20 @@
+Step - A QUnit addon for testing execution order
+================================
+
+This addon for QUnit adds a `QUnit.step` method that allows you to assert
+the proper sequence in which the code should execute.
+
+### Example ###
+
+```js
+test("example test", function () {
+ function x() {
+ QUnit.step(2, "function y should be called first");
+ }
+ function y() {
+ QUnit.step(1);
+ }
+ y();
+ x();
+});
+```
View
26 libraries/qunit/addons/step/qunit-step.js
@@ -0,0 +1,26 @@
+QUnit.extend( QUnit, {
+
+ /**
+ * Check the sequence/order
+ *
+ * @example step(1); setTimeout(function () { step(3); }, 100); step(2);
+ * @param Number expected The excepted step within the test()
+ * @param String message (optional)
+ */
+ step: function (expected, message) {
+ // increment internal step counter.
+ this.config.current.step++;
+ if (typeof message === "undefined") {
+ message = "step " + expected;
+ }
+ var actual = this.config.current.step;
+ QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
+ }
+});
+
+/**
+ * Reset the step counter for every test()
+ */
+QUnit.testStart(function () {
+ this.config.current.step = 0;
+});
View
15 libraries/qunit/addons/step/step-test.js
@@ -0,0 +1,15 @@
+module('Step Addon');
+
+test("step", 3, function () {
+ QUnit.step(1, "step starts at 1");
+ setTimeout(function () {
+ start();
+ QUnit.step(3);
+ }, 100);
+ QUnit.step(2, "before the setTimeout callback is run");
+ stop();
+});
+
+test("step counter", 1, function () {
+ QUnit.step(1, "each test has its own step counter");
+});
View
14 libraries/qunit/addons/step/step.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>QUnit Test Suite - Step Addon</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="qunit-step.js"></script>
+ <script src="step-test.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+</body>
+</html>
View
6 libraries/qunit/addons/themes/README.md
@@ -0,0 +1,6 @@
+Themes
+======
+
+These custom themes fully replace the default qunit.css file and should work
+with the default markup. To see them in action, open the HTML file for each.
+They'll run the QUnit test suite itself.
View
371 libraries/qunit/addons/themes/gabe.css
@@ -0,0 +1,371 @@
+/**
+ * QUnit Theme by Gabe Hendry
+ *
+ * http://qunitjs.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+
+/** General Styles and Page Sturcture */
+body {
+ font-family:Arial, 'sans serif';
+ padding:20px 20px 0 20px;
+ position:relative;
+}
+
+h1, h2, h3, h4, h5, h6, #qunit-header, #qunit-banner {
+ font-family:Calibri, Arial, 'sans-serif';
+}
+
+h2 #qunit-tests, h2 #qunit-testrunner-toolbar, h2 #qunit-userAgent, #qunit-testresult {
+ font-family: Arial, 'sans-serif';
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+ margin: 0;
+ padding: 0;
+}
+
+
+/** Headers */
+
+#qunit-header {
+ padding: 10px 0px 25px 0px;
+ color: #3B73B9;
+ font-size: 1.8em;
+ font-weight: normal;
+ height:2em;
+}
+
+#qunit-header a {
+ text-decoration: none;
+ color: #3B73B9;
+ font-weight:bold;
+ padding-right:22px;
+ float:left;
+
+}
+
+#qunit-header label {
+ font-size:14px;
+ color:#6BC9ED;
+ float:right;
+ font-family:Arial, 'sans-serif';
+ display: inline-block;
+}
+
+#qunit-header a + label:after {
+ content: ' }';
+}
+
+#qunit-header label + label {
+ margin-right:8px;
+}
+
+#qunit-header a:hover, #qunit-header a:focus {
+ color: #3B73B9;
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAcCAYAAABoMT8aAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpERkFDNTFBMjMwREYxMUUxQTA3RjlDQkNDQzY3MkI4MCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpERkFDNTFBMTMwREYxMUUxQTA3RjlDQkNDQzY3MkI4MCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjKftvwAAAFqSURBVHja5NTNKwVRHMbxey9X3rrXStlY2ljJRiQLGytLIkUpIks7lIUFC9laCX+DhUiSlMRdsFBSdkqSt4u8ju+vnqkxZriZheTUp1NzzvxmzjnPTNxxnFiUlohFbL9fIL9xeOUf7EEiSgEbf8XUTwv04A59mIuyB2VowyqKvytQjkU8YwaFul6CJmQ+5MB38zSGUIAs8vCi3loc6bA3mECvJl2o0Jhn/B47qAorMIgU9lGJBc/YDZbQgNugAt1I4gGtepq1ZTxiHu2B34L6LpRiD6ee8UPUqfe2lPbl0i1Qoz4T8JCgm89hf6IKdwnX6tM5ZGIEb1py1i2wporNORToUDa2LStugVntdPKr3GvMUnmFUe8p2No3FNOBkCIWsn7NOcC6Pwd2EicoUiZsnVvYxZNutpM601F/CpIFpNazH5bIel1LqOAmqrWEwG/BirQorp3KgL3yMSZxFBYkf7OJ43/jp/ouwAB8JktCUeXXIAAAAABJRU5ErkJggg==') center right no-repeat;
+}
+
+h2, p {
+ padding: 10px 0 10px 0;
+ margin:0;
+ font-size:1.3em;
+}
+
+p {
+ padding-top:0;
+ font-size:small;
+ color:#7B7979;
+ line-height:1.6em;
+}
+
+h2#qunit-banner {
+ height: 16px;
+ padding:5px 5px 5px 25px;
+ line-height:16px;
+ margin:0px 0 15px 0;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ background-position:0px;
+ background-repeat:no-repeat;
+ font-size:1em;
+ font-weight:normal;
+}
+
+h2#qunit-banner.qunit-pass {
+ background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc1RjgyNEY5MzE2NzExRTFCQTA0RTIzMEVFNkY4ODM2IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjc1RjgyNEZBMzE2NzExRTFCQTA0RTIzMEVFNkY4ODM2Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzVGODI0RjczMTY3MTFFMUJBMDRFMjMwRUU2Rjg4MzYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzVGODI0RjgzMTY3MTFFMUJBMDRFMjMwRUU2Rjg4MzYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4C94F5AAAAwklEQVR42mL8//8/AyWAiYFCQLEBLOW7GEnVYwzEaUC8B4hXs5CoWRCIVwGxEtQQE1K9ANMMN5AUAzqA2AWJ/x6IzxJrAMi55WhiriBDYAYoEQi0DjSxdJDtsGgESd4F4jNYDAIF2m4oDQOzoBieDsqRbDoDpWEAXfMeqO0oCWkPmo1noH6eiWbYPSAOw5YSQYKr0cRnQg1BDvEwKI1hAEyyAk9AVsACDV9e6MRhSydyoBHKTKuh8bsHSTM+lzEABBgAXD0oIFydPtEAAAAASUVORK5CYII=');
+ color:#76B900;
+}
+
+h2#qunit-banner.qunit-pass:after {
+ content:'Congrats! All of your tests passed!';
+}
+
+h2#qunit-banner.qunit-fail {
+ background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjU5QUIzNEU2MzE2NzExRTE4ODc3OEVFNEY2NzhDMjM4IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjU5QUIzNEU3MzE2NzExRTE4ODc3OEVFNEY2NzhDMjM4Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NTlBQjM0RTQzMTY3MTFFMTg4Nzc4RUU0RjY3OEMyMzgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NTlBQjM0RTUzMTY3MTFFMTg4Nzc4RUU0RjY3OEMyMzgiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz46NEjgAAAAzElEQVR42mL8//8/AyWABUS8N1EFUS5AfA+KcQFBIE6DsjsFz9yGGAAEu6EGgEA6EM/CoRmkzhiJX8EE5bggKZyJZAsuzQwwNhMOp6IbsgpNM9jn8DCAOnsmFkNgNrlg0dyJbMAsNE0MOPgwza5AfBbdC7OgLsEHUDRjCwNChqBoxhWIxngMQI8dDAPKsSlCM2AmLgNAkh04/I3TECZcJiNFrys+Q2AGhOLQPAsaaLgMwZkS0fMDLkPgBqzGoxnZEBMg3gM1CBzdAAEGABpTMr+umvCXAAAAAElFTkSuQmCC');
+ color:#ee3324;
+}
+
+h2#qunit-banner.qunit-fail:after {
+ content:'Oops! One or more tests failed!';
+}
+
+/** Test Runner Result Styles */
+
+#qunit-testrunner-toolbar {
+ position:absolute;
+ top:55px;
+ right:20px;
+ color:#6BC9ED;
+ font-size:14px;
+}
+
+#qunit-testrunner-toolbar:after {
+ content:' }';
+}
+
+#qunit-modulefilter-container label {
+ display: inline-block;
+ margin-left: 1em;
+}
+
+h2#qunit-userAgent {
+ padding: 0;
+ color: #7B7979;
+ border:0;
+ font-size:small;
+ font-family: Arial, 'sans-serif';
+ font-weight:normal;
+ font-style:italic;
+}
+
+h2#qunit-userAgent:before {
+ content:'User Agents: ';
+}
+
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+ list-style-position: inside;
+ list-style-type:none;
+}
+
+#qunit-tests li {
+ padding: 4px 10px;
+ list-style-position:outside;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ margin-bottom:5px;
+ position:relative;
+ *zoom:1;
+ list-style-type:none;
+}
+
+#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
+ display: none;
+}
+
+#qunit-tests li strong {
+ cursor: pointer;
+}
+
+#qunit-tests li a {
+ display:block;
+ position:absolute;
+ right:10px;
+ padding:0px 16px 0 0;
+ font-size:0.8em;
+ background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAYCAYAAADOMhxqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpENEZDRDdDQTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpENEZDRDdDOTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MDRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpE8SAQAAAD3SURBVHjaYsw5+YYBC5gGxN+BuBhdgoUBO1AFYlMgFgXiOGQJJjSFrEDcC8RaQMwPxEFAvBuXDSDFP6D4F1SMG4gtgFgBiB+g2/ATiL8C8UIgPgMV+wvEujDFyBoWQRVPB+IsqOa3QCyFrBhZgysQMwLxFCjfB4hFgPgVlH8DiOcha/jHgBu0ALEMEH9G1rAXqikHi4ZkIP4DxEuQNaQBMReUngjEdkAcDPU8KKROAPFp5GAFBSUPNHZToZEFM+wsEHtgiziQJmYg7gPiy0B8HIiTgNgRX0yD/FFzYdXZK0B8Fchei5GWgBI40xJQbjQtjdi0BBBgAAsUYVWmfe1CAAAAAElFTkSuQmCC') bottom right no-repeat;
+ color: #3b73b9;
+ text-decoration: none;
+ height:12px;
+ top:5px;
+}
+#qunit-tests li a:hover,
+#qunit-tests li a:focus {
+ color: #6bc9ed;
+ background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAYCAYAAADOMhxqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpENEZDRDdDQTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpENEZDRDdDOTMxODUxMUUxOTc3NEQ0OTUxNjc4REFEQiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MDRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4RjRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpE8SAQAAAD3SURBVHjaYsw5+YYBC5gGxN+BuBhdgoUBO1AFYlMgFgXiOGQJJjSFrEDcC8RaQMwPxEFAvBuXDSDFP6D4F1SMG4gtgFgBiB+g2/ATiL8C8UIgPgMV+wvEujDFyBoWQRVPB+IsqOa3QCyFrBhZgysQMwLxFCjfB4hFgPgVlH8DiOcha/jHgBu0ALEMEH9G1rAXqikHi4ZkIP4DxEuQNaQBMReUngjEdkAcDPU8KKROAPFp5GAFBSUPNHZToZEFM+wsEHtgiziQJmYg7gPiy0B8HIiTgNgRX0yD/FFzYdXZK0B8Fchei5GWgBI40xJQbjQtjdi0BBBgAAsUYVWmfe1CAAAAAElFTkSuQmCC') top right no-repeat;
+}
+#qunit-tests li.pass strong > span {color:#76B900;}
+#qunit-tests li.pass strong:first-child {
+ padding-left:20px;
+ background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozODgyNDY5QzMxN0ExMUUxOTdFMkVCQkNENjFBMjc3RSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozODgyNDY5QjMxN0ExMUUxOTdFMkVCQkNENjFBMjc3RSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv7qI08AAAClSURBVHjaYvz//z8DKYClfBcjMeqUgFgQiM+yEKEYpHA3VFMYExEaVkEVg20ipKEDiF2g7LNAPIsJaqUgFsVpQFwOZb8H4nQQzQR13zuoAhgwhpoOA2FQGxiYkNw3E4phnoTZWgHEe2A6maC63yM54y6S4llA3InsTiaobhOYlUiKz0JNZ0DXAAL3gNgViFcjeRLZZkRMI7FhioyhBrzHFs4AAQYAz08iXvWgossAAAAASUVORK5CYII=') center left no-repeat;
+}
+
+#qunit-tests li.fail strong > span {color:#EE3324;}
+#qunit-tests li.fail strong:first-child {
+ padding-left:20px;
+ background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0MzNBNEM0QzMxN0ExMUUxQjk0MUYyOEJCODA0OTM1OSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0MzNBNEM0QjMxN0ExMUUxQjk0MUYyOEJCODA0OTM1OSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MTRENzREMkRFMzBFMTExQkZCM0YxOUI1MEUyRUQ0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PnO7dSIAAACtSURBVHjaYnxnrMIABEpA/B6K0YEgEBsD8VnBM7ffM0E5d6HYGIvi3UiYgQkqiCyJrAmZbwzTcBaKYZrOAHEaEM9E05wOIlig7nZFM20mmtM6gXgWzAYGJE1nsXgapLACxmFCkniPQwOKGLKGmVC3owMUcZiGDjTFs9BMhmuCxUM5muJ0qJ9Wo2lCcRII7IEFH9RPYbDQgaUCFqjVYdDkMQuLH9Khau6BOAABBgDmhyuetyQ3ywAAAABJRU5ErkJggg==') center left no-repeat;
+}
+
+.qunit-assert-list {
+ margin:0;
+ padding:10px 0 0 0;
+ background-color: #fff;
+}
+
+.qunit-assert-list li {
+ list-style-position: inside;
+ list-style-type:decimal;
+ *list-style-position: outside;
+}
+
+.qunit-collapsed {
+ display: none;
+}
+
+#qunit-tests table {
+ border-collapse: collapse;
+ margin-top: .2em;
+}
+
+#qunit-tests th {
+ text-align: right;
+ vertical-align: top;
+ padding: 0 .5em 0 0;
+}
+
+#qunit-tests td {
+ vertical-align: top;
+}
+
+#qunit-tests pre {
+ margin: 0;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+#qunit-tests del {
+ background-color: #add566;
+ color: #555;
+ text-decoration: none;
+}
+
+#qunit-tests ins {
+ background-color: #f5857c;
+ color: #555;
+ text-decoration: none;
+}
+
+/*** Test Counts */
+
+#qunit-tests b.counts {
+ color: #7B7979;
+ font-size:0.8em;
+ margin-left:10px;
+}
+
+b.counts b.passed, b.counts b.failed {
+ display:inline-block;
+ padding:0px 1px;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ color:#FFF;
+}
+
+b.counts b.passed {
+ background:#76b900;
+}
+
+b.counts b.failed {
+ background:#ee3324;
+ }
+
+
+#qunit-tests li li {
+ margin:0 0 5px;
+ padding: 0.4em 0.5em 0.4em 0.5em;
+ background-color: #fff;
+ border-bottom: none;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ overflow:auto;
+}
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+ color: #7B7979;
+ background-color: #fff;
+ border-left: 20px solid #76B900;
+}
+
+#qunit-tests .pass { color: #76B900; background-color: #FFF; border: 1px solid #add566; }
+
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected { color: #999999; }
+
+
+/*** Failing Styles */
+#qunit-tests li.fail ol {
+ background:#f7f7f7;
+}
+
+#qunit-tests li li.fail {
+ color: #7B7979;
+ background-color: #fff;
+ border-left: 20px solid #EE3324;
+ white-space: pre;
+}
+
+#qunit-tests .fail { color: #EE3324; border: 1px solid #f5857c; background-color: #f7f7f7; }
+
+
+#qunit-tests .fail .test-actual,
+#qunit-tests .fail .test-expected { color: #999999; }
+
+
+
+/** Result */
+
+p#qunit-testresult {
+ padding: 10px 0;
+ font-weight:bold;
+ line-height:1.6em;
+ color: #7B7979;
+}
+
+p#qunit-testresult span.passed, p#qunit-testresult span.failed {
+ font-size:1.5em;
+ font-weight:bold;
+ display:inline-block;
+ padding:3px;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+p#qunit-testresult span.passed {
+ color:#FFF;
+ background:#76b900
+}
+
+p#qunit-testresult span.failed {
+ color:#FFF;
+ background:#ee3324;
+}
+
+
+/** Fixture */
+
+#qunit-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+ width: 1000px;
+ height: 1000px;
+}
View
15 libraries/qunit/addons/themes/gabe.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>QUnit Test Suite - Gabe Theme</title>
+ <link rel="stylesheet" href="gabe.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="../../test/test.js"></script>
+ <script src="../../test/deepEqual.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture">test markup</div>
+</body>
+</html>
View
196 libraries/qunit/addons/themes/ninja.css
@@ -0,0 +1,196 @@
+/**
+ * QUnit Ninja Theme by Jamie Hoover
+ *
+ * http://qunitjs.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ */
+body {
+ background:#111 no-repeat -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(1, #111));
+ background:#111 no-repeat -webkit-linear-gradient(top, #222 0%, #111 100%);
+ background:#111 no-repeat -moz-linear-gradient(top, #222 0%, #111 100%);
+ background:#111 no-repeat -o-linear-gradient(top, #222 0%, #111 100%);
+ background:#111 no-repeat -ms-linear-gradient(top, #222 0%, #111 100%);
+ background:#111 no-repeat linear-gradient(top, #222 0%, #111 100%);
+ color:#ccc;
+ font:12px/16px "Lucida Grande",sans-serif;
+ margin:0 auto;
+ max-width:1024px;
+ min-width:800px;
+ padding:24px;
+ position:relative;
+}
+#qunit-header {
+ font-size:24px;
+ line-height:1;
+ margin:0 520px 0 0;
+}
+#qunit-header > a {
+ color:#ccc;
+ text-decoration:none;
+}
+#qunit-header > a:hover {
+ color:#ccc;
+ text-decoration:underline;
+}
+#qunit-testresult {
+ font:12px/12px "Menlo",monospace;
+ margin:0;
+ position:absolute;
+ right:24px;
+ top:20px;
+}
+#qunit-testresult .module-name {
+ font-weight:bold;
+}
+#qunit-testresult br {
+ content:'';
+}
+#qunit-testresult span:before {
+ content:' ';
+}
+#qunit-testresult span.failed {
+ color:#c33;
+}
+#qunit-testresult span.passed {
+ color:#6c6;
+}
+#qunit-testrunner-toolbar {
+ position:absolute;
+ right:24px;
+ top:40px;
+}
+#qunit-testrunner-toolbar input {
+ font:inherit;
+ margin:0 6px 0 24px;
+}
+#qunit-testrunner-toolbar label {
+ display:inline-block;
+}
+#qunit-testrunner-toolbar select {
+ position:absolute;
+ right:24px;
+ top:22px;
+}
+#qunit-modulefilter-container label {
+ display:none;
+}
+#qunit-banner {
+ height:1px;
+ margin:24px 0;
+}
+#qunit-banner.qunit-fail {
+ background-color:#c33;
+}
+#qunit-banner.qunit-pass {
+ background-color:#6c6;
+}
+#qunit-tests {
+ color:#666;
+ font:12px/24px "Menlo",monospace;
+ list-style-position:inside;
+ padding:0;
+}
+#qunit-tests b.counts {
+ font-weight:normal;
+}
+#qunit-tests b.counts b {
+ font-weight:normal;