qunit.admin.js 456 B

123456789101112131415161718192021
  1. (function($) {
  2. /**
  3. * Provide a Drupal-specific wrapper for the QUnit JavaScript test framework.
  4. */
  5. Drupal.tests = Drupal.tests || {};
  6. Drupal.behaviors.runTests = {
  7. attach: function(context, settings) {
  8. var index;
  9. var loaded = 0;
  10. for (index in Drupal.tests) {
  11. var testCase = Drupal.tests[index];
  12. var info = testCase.getInfo();
  13. module(info.group, testCase);
  14. test(info.name, testCase.test);
  15. }
  16. }
  17. };
  18. })(jQuery);