Skip to content

Commit

Permalink
feat(eslint): Upgrade to ESLint v6 (#236)
Browse files Browse the repository at this point in the history
*  feat(eslint): Upgrade to ESLint v6 

BREAKING CHANGE: eslint 6+ is now required

Co-authored-by: Hamza Hamidi <hamidihamzacg@gmail.com>
  • Loading branch information
kylemh and hamzahamidi committed May 21, 2020
1 parent 71f8d84 commit b2ae087
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/__tests__/index.js
Expand Up @@ -349,12 +349,13 @@ test('resolves to the local eslint module', () => {
});

test('reads text from fs if filePath is provided but not text', () => {
const readFileSyncMockSpy = jest.spyOn(fsMock, 'readFileSync');

const filePath = '/blah-blah/some-file.js';
format({ filePath });
// format({filePath}).catch(() => {})
// one hit to get the file and one for the eslintignore
expect(fsMock.readFileSync).toHaveBeenCalledTimes(2);
expect(fsMock.readFileSync).toHaveBeenCalledWith(filePath, 'utf8');

expect(readFileSyncMockSpy).toHaveBeenCalledWith(filePath, 'utf8');

});

test('logs error if it cannot read the file from the filePath', () => {
Expand Down

0 comments on commit b2ae087

Please sign in to comment.