promise.js 478 B

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