설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

helpers.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Restore the require/define
  2. var require = $.fn.select2.amd.require;
  3. var define = $.fn.select2.amd.define;
  4. // Disable jQuery's binding to $
  5. jQuery.noConflict();
  6. var Utils = require('select2/utils');
  7. function MockContainer () {
  8. MockContainer.__super__.constructor.call(this);
  9. }
  10. Utils.Extend(MockContainer, Utils.Observable);
  11. MockContainer.prototype.isOpen = function () {
  12. return this.isOpen;
  13. };
  14. var log = [];
  15. var testName;
  16. QUnit.done(function (test_results) {
  17. var tests = [];
  18. for(var i = 0, len = log.length; i < len; i++) {
  19. var details = log[i];
  20. tests.push({
  21. name: details.name,
  22. result: details.result,
  23. expected: details.expected,
  24. actual: details.actual,
  25. source: details.source
  26. });
  27. }
  28. test_results.tests = tests;
  29. window.global_test_results = test_results;
  30. });
  31. QUnit.testStart(function(testDetails){
  32. QUnit.log(function(details){
  33. if (!details.result) {
  34. details.name = testDetails.name;
  35. log.push(details);
  36. }
  37. });
  38. });
  39. define('qunit', function () {
  40. return QUnit;
  41. })