Closed tadatuta closed 8 years ago
@indutny ping?
Pong, looking
@tadatuta the problem with a test is following:
this.reapply()
returns { block: 'b2', content: 'ok'}
as it should be. Then it gets passed to .renderContent
, but now with this
of the b1
, which has this.wtf
set to fail
. renderContent
is obviously re-rendering it with a fail
in content
.
From what we have in code - this is quite expected behavior, isn't it? You are returning BEMJSON object and if content
mode does this - templates will use it as BEMJSON to render the contents.
I still can't understand the difference with BEMHTML (see https://github.com/bem/bem-xjst/blob/bemtree-nextgen/test/bemhtml/runtime-test.js#L199-L210)?
The difference is that BEMHTML returns string
instance and not BEMJSON
when you call this.reapply()
.
ok, thank you, got it. will update tests.
https://github.com/bem/bem-xjst/blob/bemtree-nextgen/test/bemtree/runtime-test.js#L262-L279