Renaming a spec
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by visionmedia · committed by visionmedia · parent ec25864 · Browse files · 3 files·+40 added−40 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+40 added−40 removed
- tests:+40 added−40 removed
Provenance
- Commit
4fa345d- Tree
7d966da- Author
visionmedia <tj@vision-media.ca>- Committer
visionmedia <tj@vision-media.ca>- Parent
ec25864
3 files changed+40 added−40 removed
deleted:spec/spec.collection.libxml.js-39 removed
123456789101112131415161718192021222324252627282930313233343536373839
process.mixin(require('express/collection'))process.mixin(require('express/element-collection'))
describe 'Express' describe 'ElementCollection' describe '$("markup string")' it 'should return a ElementCollection' $('<p>foo</p>').should.be_an_instance_of Collection $('<p>foo</p>').should.be_an_instance_of ElementCollection end it 'should wrap with <html><body>.. when not present' $('<p>foo</p>').at(0).name().should.eql 'html' end it 'should not wrap with <html><body> when already present' $('<html><body></body></html>').at(0).name().should.eql 'html' end end describe '#name()' it 'should return the first elements name' $('<html><body></body></html>').name().should.eql 'html' end end describe '#xpath()' it 'should find children matching the given xpath' $('<li>1</li><li>2</li>').xpath('descendant-or-self::li').length().should.eql 2 $('<li>1</li><li>2</li>').xpath('descendant-or-self::li').at(0).name().should.eql 'li' var items = $('<li><p>Foo</p></li><li><p>Bar</p></li>').xpath('descendant-or-self::li') items.xpath('descendant-or-self::p').length().should.eql 2 end end endendNo newline at end of fileadded:spec/spec.element-collection.js+39 added
123456789101112131415161718192021222324252627282930313233343536373839
process.mixin(require('express/collection'))process.mixin(require('express/element-collection'))
describe 'Express' describe 'ElementCollection' describe '$("markup string")' it 'should return a ElementCollection' $('<p>foo</p>').should.be_an_instance_of Collection $('<p>foo</p>').should.be_an_instance_of ElementCollection end it 'should wrap with <html><body>.. when not present' $('<p>foo</p>').at(0).name().should.eql 'html' end it 'should not wrap with <html><body> when already present' $('<html><body></body></html>').at(0).name().should.eql 'html' end end describe '#name()' it 'should return the first elements name' $('<html><body></body></html>').name().should.eql 'html' end end describe '#xpath()' it 'should find children matching the given xpath' $('<li>1</li><li>2</li>').xpath('descendant-or-self::li').length().should.eql 2 $('<li>1</li><li>2</li>').xpath('descendant-or-self::li').at(0).name().should.eql 'li' var items = $('<li><p>Foo</p></li><li><p>Bar</p></li>').xpath('descendant-or-self::li') items.xpath('descendant-or-self::p').length().should.eql 2 end end endendNo newline at end of filemodified:spec/spec.node.js+1 added-1 removed
26 unmodified lines272829303131323334354 unmodified lines26 unmodified lines .exec('spec/spec.helpers.js') .exec('spec/spec.mime.js') .exec('spec/spec.view.js') .exec('spec/spec.collection.js') .exec('spec/spec.collection.libxml.js') .exec('spec/spec.element-collection.js') .exec('spec/spec.plugins.js') .exec('spec/spec.plugins.common-logger.js') .exec('spec/spec.plugins.content-length.js') .exec('spec/spec.plugins.method-override.js')4 unmodified lines