bem-sdk-archive / bem-decl

:capital_abcd: Manage declaration of BEM entities. DEPRECATED →
https://github.com/bem/bem-sdk/tree/master/packages/decl
Other
11 stars 3 forks source link

normalize2 should process unscoped entities #49

Closed qfox closed 8 years ago

qfox commented 8 years ago
normalize({
    elems: ['close'],
    mods: {theme: 'protect'}
})

should return

[
    {entity: {block: null}}
    {entity: {block: null, elem: 'close'}}
    {entity: {block: null, modName: 'theme', modVal: 'protect'}}
]

but returns just:

[
    {entity: {block: undefined, modName: 'theme', modVal: 'protect'}}
]

cc @Yeti-or

skad0 commented 8 years ago

I think it should return this:

[
    {entity: {block: null}}
    {entity: {block: null, modName: 'theme', modVal: 'protect'}}
    {entity: {block: null, elem: 'close'}}
]

According to other tests, i think block and his mods first, then others.