Closed tadatuta closed 8 years ago
There is a test for changing mods in runtime (https://github.com/bem/bem-xjst/blob/master/test/runtime-test.js#L221) but same thing fails for elemMods. So this test
mods
elemMods
it('should support changing elemMods in runtime', function() { test(function() { block('b1').elem('e1').def()(function() { this.elemMods.a = 'b'; return applyNext(); }); }, { block: 'b1', content: { elem: 'e1' } }, '<div class="b1"><div class="b1__e1 b1__e1_a_b"</div>'); });
will fail with AssertionError: '<div class="b1"><div class="b1__e1"></div></div>' deepEqual '<div class="b1"><div class="b1__e1 b1__e1_a_b"</div>'.
AssertionError: '<div class="b1"><div class="b1__e1"></div></div>' deepEqual '<div class="b1"><div class="b1__e1 b1__e1_a_b"</div>'
Take a look pleasee?
/cc @indutny @veged
looks ok
There is a test for changing
mods
in runtime (https://github.com/bem/bem-xjst/blob/master/test/runtime-test.js#L221) but same thing fails forelemMods
. So this testwill fail with
AssertionError: '<div class="b1"><div class="b1__e1"></div></div>' deepEqual '<div class="b1"><div class="b1__e1 b1__e1_a_b"</div>'
.