Commit 56b3ba99 authored by Daniel Kennedy's avatar Daniel Kennedy
Browse files

Fix linting issues

parent d025a8c7
Loading
Loading
Loading
Loading
−3

File deleted.

+5 −5
Changes for __tests__/merge.test.ts: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -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<string>>().mockResolvedValue('/tmp/merge-artifact'),
  mkdtemp: jest
    .fn<() => Promise<string>>()
    .mockResolvedValue('/tmp/merge-artifact'),
  rm: jest.fn<() => Promise<void>>().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
}))
+2 −2
Changes for __tests__/search.test.ts: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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)
+2 −3
Changes for __tests__/upload.test.ts: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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
}))