1 | 'use strict';
|
2 |
|
3 | var assert = require('chai').assert,
|
4 | buildBemdeclByBemjson = require('..').require('./techs/v2/bemdecl.js.js').techMixin.buildBemdeclByBemjson;
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | describe('BEMDECL', function() {
|
17 | describe('buildBemdeclByBemjson:', function() {
|
18 | it('should properly parse custom content fields', function() {
|
19 | assert.deepEqual(
|
20 | buildBemdeclByBemjson({
|
21 | block: 'b',
|
22 | bem: { block: 'bla4' },
|
23 | tag: { block: 'bla5' },
|
24 | attrs: { block: 'bla6' },
|
25 | cls: { block: 'bla7' },
|
26 | js: { block: 'bla8' },
|
27 | custom1: { block: 'b1' },
|
28 | custom2: {
|
29 | a1: { block: 'a1' },
|
30 | a2: { block: 'a2' }
|
31 | },
|
32 | mix: [ { block: 'c' } ],
|
33 | content: { block: 'd' }
|
34 | }),
|
35 | [
|
36 | { name: 'b' },
|
37 | { name: 'b1' },
|
38 | { name: 'a1' },
|
39 | { name: 'a2' },
|
40 | { name: 'c' },
|
41 | { name: 'd' }
|
42 | ]
|
43 | );
|
44 | });
|
45 | });
|
46 | });
|