Skip to content
Myr

Added ElementCollection#{prev,next}()

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

authored by visionmedia · committed by visionmedia · parent a5ca9d8 · Browse files · 2 files+34 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

2 files+34 added−0 removed

  • tests:+12 added−0 removed
  • other:+22 added−0 removed

2 files+34 added−0 removed

modified:lib/express/element-collection.js+22 added
modified:spec/spec.element-collection.js+12 added
59 unmodified lines
60 $('<p>foo bar</p>').text().should.eql 'foo bar'61 end62 end63 64 describe '#next()'65 it 'should return the next element'66 $('<em>foo</em><p>bar</p>').xpath('descendant-or-self::em').next().text().should.eql 'bar'67 end68 end69 70 describe '#prev()'71 it 'should return the previous element'72 $('<em>foo</em><p>bar</p>').xpath('descendant-or-self::p').prev().text().should.eql 'foo'73 end74 end75 76 end77end