Code coverage report for bookshelf/lib/base/promise.js

Statements: 46.67% (7 / 15)      Branches: 100% (0 / 0)      Functions: 0% (0 / 4)      Lines: 46.67% (7 / 15)      Ignored: none     

All files » bookshelf/lib/base/ » promise.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23    1 1   1       1       1       1         1
'use strict';
 
var Promise = require('bluebird/js/main/promise')();
var helpers = require('../helpers');
 
Promise.prototype['yield'] = function () {
  helpers.deprecate('.yield', '.return');
  return this['return'].apply(this, arguments);
};
Promise.prototype.ensure = function () {
  helpers.deprecate('.ensure', '.finally');
  return this['finally'].apply(this, arguments);
};
Promise.prototype.otherwise = function () {
  helpers.deprecate('.otherwise', '.catch');
  return this['catch'].apply(this, arguments);
};
Promise.prototype.exec = function () {
  helpers.deprecate('bookshelf.exec', 'bookshelf.asCallback');
  return this.nodeify.apply(this, arguments);
};
 
module.exports = Promise;