11import { mocked } from 'jest-mock' ;
22import { isIgnoreCommentPresent , isStrictCommentPresent } from '../../isCommentPresent' ;
3- import { getFilePathsWithErrors , getFilePathsWithoutErrors } from '../getFilePaths' ;
3+ import { getFilePathsWithErrors , getFilePathsOnPathWithoutErrors } from '../getFilePaths' ;
44import { updateStrictComments } from '../updateStrictComments' ;
55import { insertIgnoreComment , removeStrictComment } from '../commentOperations' ;
66
@@ -10,7 +10,7 @@ jest.mock('../../findStrictErrors', () => ({
1010
1111jest . mock ( '../getFilePaths' , ( ) => ( {
1212 getFilePathsWithErrors : jest . fn ( ) ,
13- getFilePathsWithoutErrors : jest . fn ( ) ,
13+ getFilePathsOnPathWithoutErrors : jest . fn ( ) ,
1414} ) ) ;
1515
1616jest . mock ( '../../isCommentPresent' , ( ) => ( {
@@ -24,7 +24,7 @@ jest.mock('../commentOperations', () => ({
2424} ) ) ;
2525
2626const getFilePathsWithErrorsMock = mocked ( getFilePathsWithErrors ) ;
27- const getFilePathsWithoutErrorsMock = mocked ( getFilePathsWithoutErrors ) ;
27+ const getFilePathsOnPathWithoutErrorsMock = mocked ( getFilePathsOnPathWithoutErrors ) ;
2828
2929const isStrictCommentPresentMock = mocked ( isStrictCommentPresent ) ;
3030const isIgnoreCommentPresentMock = mocked ( isIgnoreCommentPresent ) ;
@@ -33,7 +33,7 @@ describe('updateStrictComments', () => {
3333 beforeEach ( ( ) => {
3434 jest . resetAllMocks ( ) ;
3535 getFilePathsWithErrorsMock . mockResolvedValue ( [ ] ) ;
36- getFilePathsWithoutErrorsMock . mockReturnValue ( [ ] ) ;
36+ getFilePathsOnPathWithoutErrorsMock . mockReturnValue ( [ ] ) ;
3737 } ) ;
3838
3939 it ( 'should not change comments when there is no strict errors in file' , async ( ) => {
@@ -89,7 +89,7 @@ describe('updateStrictComments', () => {
8989
9090 it ( 'should remove strict comment when file is on configured path' , async ( ) => {
9191 // given
92- getFilePathsWithoutErrorsMock . mockReturnValue ( [ '/dir/file.ts' ] ) ;
92+ getFilePathsOnPathWithoutErrorsMock . mockReturnValue ( [ '/dir/file.ts' ] ) ;
9393 isStrictCommentPresentMock . mockReturnValue ( true ) ;
9494 isIgnoreCommentPresentMock . mockReturnValue ( false ) ;
9595
0 commit comments