diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 6aac1da..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -lib/ -dist/ \ No newline at end of file diff --git a/__tests__/merge.test.ts b/__tests__/merge.test.ts index 07be7ce..a252a1e 100644 --- a/__tests__/merge.test.ts +++ b/__tests__/merge.test.ts @@ -42,15 +42,15 @@ jest.unstable_mockModule('@actions/core', () => ({ const actualFsPromises = await import('fs/promises') jest.unstable_mockModule('fs/promises', () => ({ ...actualFsPromises, - mkdtemp: - jest.fn<() => Promise>().mockResolvedValue('/tmp/merge-artifact'), + mkdtemp: jest + .fn<() => Promise>() + .mockResolvedValue('/tmp/merge-artifact'), rm: jest.fn<() => Promise>().mockResolvedValue(undefined) })) // Mock shared search module -const mockFindFilesToUpload = jest.fn< - () => Promise<{filesToUpload: string[]; rootDirectory: string}> ->() +const mockFindFilesToUpload = + jest.fn<() => Promise<{filesToUpload: string[]; rootDirectory: string}>>() jest.unstable_mockModule('../src/shared/search.js', () => ({ findFilesToUpload: mockFindFilesToUpload })) diff --git a/__tests__/search.test.ts b/__tests__/search.test.ts index 5eb87cf..a6285d9 100644 --- a/__tests__/search.test.ts +++ b/__tests__/search.test.ts @@ -315,7 +315,7 @@ describe('Search', () => { const searchPath1 = path.join(root, 'folder-a') const searchPath2 = path.join(root, 'folder-d') - const searchPaths = searchPath1 + '\n' + searchPath2 + const searchPaths = `${searchPath1}\n${searchPath2}` const searchResult = await findFilesToUpload(searchPaths) expect(searchResult.rootDirectory).toEqual(root) @@ -341,7 +341,7 @@ describe('Search', () => { const searchPath3 = path.join(root, 'folder-a', 'folder-b', '**/extra*.txt') // negating the third search path - const searchPaths = searchPath1 + '\n' + searchPath2 + '\n!' + searchPath3 + const searchPaths = `${searchPath1}\n${searchPath2}\n!${searchPath3}` const searchResult = await findFilesToUpload(searchPaths) expect(searchResult.rootDirectory).toEqual(root) diff --git a/__tests__/upload.test.ts b/__tests__/upload.test.ts index 7bb4f78..6e0c26a 100644 --- a/__tests__/upload.test.ts +++ b/__tests__/upload.test.ts @@ -39,9 +39,8 @@ jest.unstable_mockModule('@actions/core', () => ({ })) // Mock shared search module -const mockFindFilesToUpload = jest.fn< - () => Promise<{filesToUpload: string[]; rootDirectory: string}> ->() +const mockFindFilesToUpload = + jest.fn<() => Promise<{filesToUpload: string[]; rootDirectory: string}>>() jest.unstable_mockModule('../src/shared/search.js', () => ({ findFilesToUpload: mockFindFilesToUpload }))