2024-05-02 16:38:23 +00:00
|
|
|
/**
|
|
|
|
* Unit tests for the action's entrypoint, src/index.ts
|
|
|
|
*/
|
|
|
|
|
|
|
|
import * as main from '../src/main'
|
|
|
|
|
|
|
|
// Mock the action's entrypoint
|
|
|
|
const runMock = jest.spyOn(main, 'run').mockImplementation()
|
|
|
|
|
|
|
|
describe('index', () => {
|
|
|
|
it('calls run when imported', async () => {
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
2024-05-03 14:17:32 +00:00
|
|
|
require('../src/index')
|
2024-05-02 16:38:23 +00:00
|
|
|
|
|
|
|
expect(runMock).toHaveBeenCalled()
|
|
|
|
})
|
|
|
|
})
|