Skip to content

Commit

Permalink
feat: should also pull resources from is=
Browse files Browse the repository at this point in the history
  • Loading branch information
pemrouz committed Jul 24, 2016
1 parent 8aa8f44 commit ed857e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var limit = function limit(next) {
};

var deps = function deps(el) {
return format([(0, _key2.default)('nodeName'), (0, _attr2.default)('data'), (0, _attr2.default)('css')])(el);
return format([(0, _key2.default)('nodeName'), (0, _attr2.default)('data'), (0, _attr2.default)('css'), (0, _attr2.default)('is')])(el);
};

var format = function format(arr) {
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const deps = el => format([
key('nodeName')
, attr('data')
, attr('css')
, attr('is')
])(el)

const format = arr => el => arr
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ describe('Backpressure', function(){

it('should extract deps', function(){
var ripple = back(sync(draw(data(core()))))
, el1 = el('x-foo[data=A A b][css=x-foo.css]')
, el1 = el('x-foo[data=A A b][css=x-foo.css][is=baz]')

expect(ripple.deps(el1)).to.eql(['x-foo', 'a', 'b', 'x-foo.css'])
expect(ripple.deps(el1)).to.eql(['x-foo', 'a', 'b', 'x-foo.css', 'baz'])
})

it('should pull resource not previously requested', function(done){
Expand Down

0 comments on commit ed857e4

Please sign in to comment.