Commit c2df5c69 authored by analog-nico's avatar analog-nico
Browse files

Removed exposing of .caught(...) and .lastly(...)

parent cb2000f0
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -139,9 +139,7 @@ function expose(methodToExpose, exposeAs) {
_.forEach([
_.forEach([
        ['then'],
        ['then'],
        ['catch'],
        ['catch'],
        ['caught'],
        ['finally']
        ['finally'],
        ['lastly']
    ],
    ],
    function (args) {
    function (args) {
        expose.apply(undefined, args);
        expose.apply(undefined, args);
+0 −18
Original line number Original line Diff line number Diff line
@@ -657,15 +657,6 @@ describe('Request-Promise', function () {


        });
        });


        it('.caught(...) as an alias for .catch(...)', function (done) {

            rp('http://localhost:4000/404')
                .caught(function (reason) {
                    done();
                });

        });

        it('.finally(Function handler)', function (done) {
        it('.finally(Function handler)', function (done) {


            rp('http://localhost:4000/200')
            rp('http://localhost:4000/200')
@@ -675,15 +666,6 @@ describe('Request-Promise', function () {


        });
        });


        it('.lastly(...) as an alias for .finally(...)', function (done) {

            rp('http://localhost:4000/200')
                .lastly(function () {
                    done();
                });

        });

        it('.promise() to return the Bluebird promise itself', function () {
        it('.promise() to return the Bluebird promise itself', function () {


            var context = { message: 'Hello World!'};
            var context = { message: 'Hello World!'};