@@ -3,7 +3,7 @@ import {spy, stub} from 'sinon';
33import ansiStyles from 'ansi-styles' ;
44import chalk from 'chalk' ;
55import test from 'ava' ;
6- import { h , build , Indent , Text , Component } from '..' ;
6+ import { h , build , Indent , Color , Underline , Bold , Component } from '..' ;
77import renderToString from '../lib/render-to-string' ;
88import { rerender } from '../lib/render-queue' ;
99
@@ -656,10 +656,18 @@ test('render styled text', t => {
656656 [ style ] : true
657657 } ;
658658
659- t . is ( renderToString ( build ( < Text { ...props } > Test</ Text > ) ) , chalk [ style ] ( 'Test' ) ) ;
659+ t . is ( renderToString ( build ( < Color { ...props } > Test</ Color > ) ) , chalk [ style ] ( 'Test' ) ) ;
660660 }
661661
662- t . is ( renderToString ( build ( < Text rgb = { [ 40 , 42 , 54 ] } > Test</ Text > ) ) , chalk . rgb ( 40 , 42 , 54 ) ( 'Test' ) ) ;
662+ t . is ( renderToString ( build ( < Color rgb = { [ 40 , 42 , 54 ] } > Test</ Color > ) ) , chalk . rgb ( 40 , 42 , 54 ) ( 'Test' ) ) ;
663+ } ) ;
664+
665+ test ( 'render bold text' , t => {
666+ t . is ( renderToString ( build ( < Bold > Test</ Bold > ) ) , chalk . bold ( 'Test' ) ) ;
667+ } ) ;
668+
669+ test ( 'render underlined text' , t => {
670+ t . is ( renderToString ( build ( < Underline > Test</ Underline > ) ) , chalk . underline ( 'Test' ) ) ;
663671} ) ;
664672
665673test ( 'indent text' , t => {
0 commit comments