base.js 541 B

1234567891011121314151617181920212223242526
  1. define([
  2. 'webuploader/base'
  3. ], function( Base ) {
  4. module('Base');
  5. test( 'Test dollar', 1, function() {
  6. ok( Base.$, 'ok' );
  7. });
  8. test( 'Test bindFn', 2, function() {
  9. var obj = {
  10. name: '123'
  11. },
  12. fn = function( arg1 ) {
  13. ok( this.name, '123', 'The name should be `123`,' );
  14. ok( arg1, '456', 'The value of first arg should be `456`. ');
  15. },
  16. proxyFn = Base.bindFn( fn, obj );
  17. proxyFn('456');
  18. });
  19. });