diff --git a/test/util/underscore.js b/test/util/underscore.js index da673c62b..91e0a112f 100644 --- a/test/util/underscore.js +++ b/test/util/underscore.js @@ -53,4 +53,14 @@ describe('util/underscore', function() { expect(_.isArray("foo")).to.be.false; }); }); + describe('.echo()', function(){ + it('should be transparent when called', function() { + expect(_.echo('foo')('bar')).to.equal('bar'); + }); + it('should log the arguments', function() { + var log = sinon.spy(console, 'log'); + _.echo('foo')('bar'); + expect(log).to.have.been.calledWith('[foo]', 'bar'); + }); + }); });