bem-sdk-archive / bemjson-to-decl

BEMJSON to BEMDECL converter. DEPRECATED →
https://github.com/bem/bem-sdk/tree/master/packages/bemjson-to-decl
Other
2 stars 2 forks source link

Test-case: Boolean modifier when it shouldn't be. #3

Closed Yeti-or closed 8 years ago

Yeti-or commented 8 years ago

@tadatuta check this case:

bemjson { block: 'i-jquery', mods: { version: [ 'default', true ] } }
Test #4 failed
convert
 [ { block: 'i-jquery' },
  { modName: 'version', modVal: true, block: 'i-jquery' },
  { modName: 'version', modVal: 'default', block: 'i-jquery' } ]

reference
 [ { block: 'i-jquery' },
  { modName: 'version', modVal: 'default', block: 'i-jquery' } ]
Yeti-or commented 8 years ago

bemjson:

{block: 'i-jquery', mods: {version: 'default'}}
tadatuta commented 8 years ago

actually boolean modifier is expected behavior because it also means wildcard: you may keep common implementation for different values of the same modifier in file with just modifier name.

Yeti-or commented 8 years ago

Oh! exactly. Forget about it.