Initial Commit
Some checks failed
Continuous Integration / GitHub Actions Test (push) Successful in 23s
CodeQL / Analyze (TypeScript) (push) Failing after 5m27s
Check Transpiled JavaScript / Check dist/ (push) Has been cancelled
Continuous Integration / TypeScript Tests (push) Has been cancelled
Lint Codebase / Lint Codebase (push) Has been cancelled
Some checks failed
Continuous Integration / GitHub Actions Test (push) Successful in 23s
CodeQL / Analyze (TypeScript) (push) Failing after 5m27s
Check Transpiled JavaScript / Check dist/ (push) Has been cancelled
Continuous Integration / TypeScript Tests (push) Has been cancelled
Lint Codebase / Lint Codebase (push) Has been cancelled
This commit is contained in:
17
__tests__/index.test.ts
Normal file
17
__tests__/index.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* 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', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
require('../src/index')
|
||||
|
||||
expect(runMock).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user