Skip to content
Myr

Shorthand specs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent c950719 · Browse files · 1 file+16 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−0 removed

  • tests:+16 added−0 removed

1 file+16 added−0 removed

modified:spec/spec.collection.js+16 added
20 unmodified lines
21 $(collection).should.equal collection22 end23 end24 25 describe 'shorthand expressions'26 describe 'with 3 or less chars'27 it 'should be considered binary operator between a / b'28 $(5..1).sort('-').toArray().should.eql 1..529 $(5..1).reduce(0, '+').should.eql 1530 end31 end32 33 describe 'with over 3 chars'34 it 'should be considered a return expression'35 $(5..1).sort('a - b').toArray().should.eql 1..536 $(5..1).reduce(0, 'a + b').should.eql 1537 end38 end39 end40 41 describe '#at()'42 it 'should return the value at the given index'43 $(['foo', 'bar']).at(0).should.eql 'foo'44 $(['foo', 'bar']).at(1).should.eql 'bar'
401 unmodified lines