bem / bem-xjst

bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
https://bem.github.io/bem-xjst
Other
115 stars 47 forks source link

In v4.x applyNext() should not return value from BEMJSON #380

Closed miripiruni closed 7 years ago

miripiruni commented 7 years ago
 it('should not duplicate nested elem mix', function() {
      test(function() {
        block('link').mix()(function() {
          return [
            { block: 'mix' }
          ].concat(applyNext() || []);
        });
        block('root').content()({
          block: 'link',
          mix: { block: 'a', elem: 'b', elemMods: { c: 'd' } }
        });
      }, {
        block: 'root'
      }, '<div class="root"><div class="link mix a__b a__b_c_d"></div>');
    });
actual:
- <div class="root"><div class="link mix a__b a__b_c_d a__b a__b_c_d"></div></div>

expected:
+ <div class="root"><div class="link mix a__b a__b_c_d"></div>
miripiruni commented 7 years ago

Fixed in v4.4.1