synapsestudios / synapse-common

DEPRECATED
MIT License
1 stars 2 forks source link

Add getFakePromise test helper #27

Open paulstatezny opened 9 years ago

paulstatezny commented 9 years ago

Abstract away method that appears in our tests over and over to mock fake promises

Acceptance Criteria

  1. This exists in a file in test-helper directory:
'use strict';

var getFakePromise = function(captured)
{
    return {
        then : function(then, fail) {
            captured.then = then;
            captured.fail = fail;

            return getFakePromise(captured);
        }
    };
};

module.exports = getFakePromise;

Tasks

paulstatezny commented 9 years ago

:zero: :sunny: :arrow_down:

bobeagan commented 9 years ago

:o: