loaders.js 498 B

12345678910111213141516171819202122
  1. require.config({
  2. paths: {
  3. jquery: '../docs/jquery-2.1.0'
  4. }
  5. });
  6. asyncTest ("requirejs", function() {
  7. require([
  8. "../spectrum"
  9. ], function(spectrum) {
  10. ok ($.fn.spectrum, "Plugin has been loaded");
  11. // Just do some basic stuff with the API as a sanity check.
  12. var el = $("<input id='spec' />").spectrum();
  13. el.spectrum("set", "red");
  14. equal(el.spectrum("get").toName(), "red", "Basic color setting");
  15. el.spectrum("destroy");
  16. QUnit.start();
  17. });
  18. });