Skip to content

Commit

Permalink
changed method of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zebpaa committed Jul 8, 2024
1 parent 0a811e9 commit f9131cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions __tests__/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const readFile = (filename) => fs.readFileSync(getFixturePath(filename), 'utf-8'
test.each(['json', 'yml', 'yaml'])('gendiff_test_format', (format) => {
const filepath1 = getFixturePath(`file1.${format}`);
const filepath2 = getFixturePath(`file2.${format}`);
expect(gendiff(filepath1, filepath2)).toBe(readFile('expectedStylish.txt'));
expect(gendiff(filepath1, filepath2, 'stylish')).toBe(readFile('expectedStylish.txt'));
expect(gendiff(filepath1, filepath2, 'plain')).toBe(readFile('expectedPlain.txt'));
expect(gendiff(filepath1, filepath2, 'json')).toBe(readFile('expectedJson.json'));
expect(gendiff(filepath1, filepath2)).toEqual(readFile('expectedStylish.txt'));
expect(gendiff(filepath1, filepath2, 'stylish')).toEqual(readFile('expectedStylish.txt'));
expect(gendiff(filepath1, filepath2, 'plain')).toEqual(readFile('expectedPlain.txt'));
expect(gendiff(filepath1, filepath2, 'json')).toEqual(readFile('expectedJson.json'));
});

0 comments on commit f9131cc

Please sign in to comment.