Created
January 22, 2015 11:04
-
-
Save nb/ba0497cf0c8f16404f6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it( 'should handle series of same component', function() { | |
var expectedResultString = '<span><a href="#">baba</a><a href="#">dyado</a></span>', | |
translatedComponent = translate( '{{link}}baba{{/link}}{{link}}dyado{{/link}}', { components: { link: link } } ); | |
assert.equal( expectedResultString, stripReactAttributes( React.renderToString( translatedComponent ) ) ); | |
} ); | |
it( 'should handle wrong cross-nesting', function() { | |
var expectedResultString = '', // how do we return error? | |
translatedComponent = translate( '{{link}}a{{em}}b{{/link}}c{{/em}}', { components: { link: link, em: em } } ); | |
assert.equal( expectedResultString, stripReactAttributes( React.renderToString( translatedComponent ) ) ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment