Skip to content

Commit

Permalink
[#2] shorten tests, minor fix stylish.js
Browse files Browse the repository at this point in the history
  • Loading branch information
igshipilov committed Nov 2, 2023
1 parent 75b2e98 commit 779acdd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 179 deletions.
4 changes: 2 additions & 2 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const __dirname = dirname(__filename);
const getFixturePath = (filename) => path.join(__dirname, '..', '__fixtures__', filename);
const readFile = (filename) => fs.readFileSync(getFixturePath(filename), 'utf-8');

const formats = [ 'json', 'yaml', 'yml' ];
const formats = ['json', 'yaml', 'yml'];

describe('genDiff should work correctly with', () => {
test.each(formats)('%p:', (format) => {
Expand All @@ -20,5 +20,5 @@ describe('genDiff should work correctly with', () => {
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.txt'));
})
});
});
Loading

0 comments on commit 779acdd

Please sign in to comment.