Skip to content

Commit

Permalink
test: chain().chain()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Garcia committed Nov 12, 2013
1 parent 83e51d4 commit 85b745f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/chain-wrap.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sinon = require 'sinon'
_ = require 'underscore'

describe 'methods on wrapped/chained objects are the same as methods on _s', ->
for obj in [_s(), _s('a'), _s().chain(), _s('a').chain()]
for obj in [_s(), _s('a'), _s().chain(), _s('a').chain(), _s().chain().chain()]
assert.deepEqual(
_.chain().functions(obj).without('value').value()
_.chain().functions(_s).without('mixin').value()
Expand Down

3 comments on commit 85b745f

@jonahkagan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's more to figure out about the behavior of .chain().chain(), but maybe not yet.

@rgarcia
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have more tests of equivalence of different expressions...I feel like we're testing X.a, X.b, Y.b, Y.z, when really a better set of tests would by X.a, X.b, X <=> Y

@jonahkagan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hard part is defining equivalence

Please sign in to comment.