@@ -24,21 +24,22 @@ const emptyYaml2 = getFixturePath('empty-file2.yaml');
2424const mainYml = getFixturePath ( 'file.yml' ) ;
2525
2626const expectedStylish = fs . readFileSync ( getFixturePath ( 'result-stylish.txt' ) , 'utf-8' ) ;
27+ const expectedStylishWithArrayHandling = fs . readFileSync ( getFixturePath ( 'result-stylish-arr.txt' ) , 'utf-8' ) ;
2728const expectedPlain = fs . readFileSync ( getFixturePath ( 'result-plain.txt' ) , 'utf-8' ) ;
2829const expectedJson = fs . readFileSync ( getFixturePath ( 'result-json.txt' ) , 'utf-8' ) ;
2930const expectedEmpty = fs . readFileSync ( getFixturePath ( 'result-empty.txt' ) , 'utf-8' ) ;
3031
3132describe ( 'nested files' , ( ) => {
3233 test ( 'stylish' , ( ) => {
33- expect ( genDiff ( mainJson1 , mainJson2 , 'stylish' ) ) . toEqual ( expectedStylish ) ;
34+ expect ( genDiff ( mainJson1 , mainJson2 , 'stylish' ) ) . toEqual ( expectedStylishWithArrayHandling ) ;
3435 } ) ;
3536
3637 test ( 'plain' , ( ) => {
3738 expect ( genDiff ( mainYaml1 , mainYaml2 , 'plain' ) ) . toEqual ( expectedPlain ) ;
3839 } ) ;
3940
4041 test ( 'json' , ( ) => {
41- expect ( genDiff ( mainJson1 , mainYml , 'json' ) ) . toEqual ( expectedJson ) ;
42+ expect ( genDiff ( mainYaml1 , mainYml , 'json' ) ) . toEqual ( expectedJson ) ;
4243 } ) ;
4344
4445 test ( 'unstated format' , ( ) => {
@@ -54,6 +55,7 @@ describe('empty files', () => {
5455 test ( 'json' , ( ) => {
5556 expect ( genDiff ( emptyJson1 , emptyJson2 ) ) . toEqual ( expectedEmpty ) ;
5657 } ) ;
58+
5759 test ( 'yaml' , ( ) => {
5860 expect ( genDiff ( emptyYaml1 , emptyYaml2 ) ) . toEqual ( expectedEmpty ) ;
5961 } ) ;
0 commit comments