Skip to content

Commit dab865e

Browse files
committed
update index.test.js
1 parent 99e433b commit dab865e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

__tests__/index.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,22 @@ const emptyYaml2 = getFixturePath('empty-file2.yaml');
2424
const mainYml = getFixturePath('file.yml');
2525

2626
const expectedStylish = fs.readFileSync(getFixturePath('result-stylish.txt'), 'utf-8');
27+
const expectedStylishWithArrayHandling = fs.readFileSync(getFixturePath('result-stylish-arr.txt'), 'utf-8');
2728
const expectedPlain = fs.readFileSync(getFixturePath('result-plain.txt'), 'utf-8');
2829
const expectedJson = fs.readFileSync(getFixturePath('result-json.txt'), 'utf-8');
2930
const expectedEmpty = fs.readFileSync(getFixturePath('result-empty.txt'), 'utf-8');
3031

3132
describe('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

Comments
 (0)