promise.js 514 B

123456789101112131415161718192021222324
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals describe, it, expect */
  6. 'use strict';
  7. var modules = bender.amd.require( 'promise' );
  8. describe( 'Promise', function() {
  9. it( 'should resolve properly', function() {
  10. var Promise = modules.promise;
  11. var promise = new Promise( function( resolve ) {
  12. resolve( 1 );
  13. } );
  14. return promise.then( function( value ) {
  15. expect( value ).to.equal( 1 );
  16. } );
  17. } );
  18. } );