@@ -184,6 +184,31 @@ describe('WordDiff', function() {
184
184
expect ( convertChangesToXML ( diffResult ) ) . to . equal ( 'New<ins> ValueMoreData</ins> <del>Value </del>' ) ;
185
185
} ) ;
186
186
187
+ it ( 'should inserts values in parenthesis' , function ( ) {
188
+ const diffResult = diffWordsWithSpace ( '()' , '(word)' ) ;
189
+ expect ( convertChangesToXML ( diffResult ) ) . to . equal ( '(<ins>word</ins>)' ) ;
190
+ } ) ;
191
+
192
+ it ( 'should inserts values in brackets' , function ( ) {
193
+ const diffResult = diffWordsWithSpace ( '[]' , '[word]' ) ;
194
+ expect ( convertChangesToXML ( diffResult ) ) . to . equal ( '[<ins>word</ins>]' ) ;
195
+ } ) ;
196
+
197
+ it ( 'should inserts values in curly braces' , function ( ) {
198
+ const diffResult = diffWordsWithSpace ( '{}' , '{word}' ) ;
199
+ expect ( convertChangesToXML ( diffResult ) ) . to . equal ( '{<ins>word</ins>}' ) ;
200
+ } ) ;
201
+
202
+ it ( 'should inserts values in quotes' , function ( ) {
203
+ const diffResult = diffWordsWithSpace ( "''" , "'word'" ) ;
204
+ expect ( convertChangesToXML ( diffResult ) ) . to . equal ( "'<ins>word</ins>'" ) ;
205
+ } ) ;
206
+
207
+ it ( 'should inserts values in double quotes' , function ( ) {
208
+ const diffResult = diffWordsWithSpace ( '""' , '"word"' ) ;
209
+ expect ( convertChangesToXML ( diffResult ) ) . to . equal ( '"<ins>word</ins>"' ) ;
210
+ } ) ;
211
+
187
212
it ( 'should perform async operations' , function ( done ) {
188
213
diffWordsWithSpace ( 'New Value ' , 'New ValueMoreData ' , function ( err , diffResult ) {
189
214
expect ( convertChangesToXML ( diffResult ) ) . to . equal ( 'New<ins> ValueMoreData</ins> <del>Value </del>' ) ;
0 commit comments