@@ -31,15 +31,15 @@ describe('PostHTML-Render test', function() {
3131 expect ( render ( { content : [ 555 ] } ) ) . to . eql ( '<div>555</div>' ) ;
3232 } ) ;
3333
34- it ( 'node array in content' , function ( ) {
35- expect ( render ( { content : [
34+ it ( 'node array in content' , function ( ) {
35+ expect ( render ( { content : [
3636 [
3737 555 ,
38- { tag : 'div' , content : 666 } ,
38+ { tag : 'div' , content : 666 } ,
3939 777
4040 ]
41- ] } ) ) . to . eql ( '<div>555<div>666</div>777</div>' )
42- } )
41+ ] } ) ) . to . eql ( '<div>555<div>666</div>777</div>' ) ;
42+ } ) ;
4343
4444 it ( 'string node' , function ( ) {
4545 expect ( render ( [ 'Hello world!' ] ) ) . to . eql ( 'Hello world!' ) ;
@@ -65,12 +65,18 @@ describe('PostHTML-Render test', function() {
6565
6666 it ( 'content test' , function ( ) {
6767 expect ( render ( { content : [ { content : [ { content : [ 'Test' , { } ] } ] } ] } ) )
68- . to . eql ( '<div><div><div>Test<div></div></div></div></div>' ) ;
68+ . to . eql ( '<div><div><div>Test<div></div></div></div></div>' ) ;
6969 } ) ;
7070
7171 describe ( 'attrs' , function ( ) {
7272 it ( 'key' , function ( ) {
73- expect ( render ( { attrs : { id : 'header' } } ) ) . to . eql ( '<div id="header"></div>' ) ;
73+ expect ( render ( { attrs : { id : 'header' } } ) )
74+ . to . eql ( '<div id="header"></div>' ) ;
75+ } ) ;
76+
77+ it ( 'empty key' , function ( ) {
78+ expect ( render ( { attrs : { alt : '' } } ) )
79+ . to . eql ( '<div alt=""></div>' ) ;
7480 } ) ;
7581
7682 it ( 'multi attrs' , function ( ) {
@@ -79,15 +85,13 @@ describe('PostHTML-Render test', function() {
7985 } ) ;
8086
8187 it ( 'true' , function ( ) {
82- expect ( render ( { attrs : { disabled : true } } ) ) . to . eql ( '<div disabled></div>' ) ;
88+ expect ( render ( { attrs : { disabled : true } } ) )
89+ . to . eql ( '<div disabled></div>' ) ;
8390 } ) ;
8491
8592 it ( 'false' , function ( ) {
86- expect ( render ( { attrs : { disabled : false } } ) ) . to . eql ( '<div></div>' ) ;
87- } ) ;
88-
89- it ( 'empty attrs' , function ( ) {
90- expect ( render ( { attrs : { disabled : '' } } ) ) . to . eql ( '<div disabled></div>' ) ;
93+ expect ( render ( { attrs : { disabled : false } } ) )
94+ . to . eql ( '<div></div>' ) ;
9195 } ) ;
9296
9397 it ( 'number attrs' , function ( ) {
0 commit comments