Restructure source and tests

This commit is contained in:
Nick Alteen
2023-09-14 10:36:27 -04:00
parent 570107f4a0
commit ea09560a8d
12 changed files with 294 additions and 94 deletions

18
__tests__/index.test.js Normal file
View File

@@ -0,0 +1,18 @@
/**
* Unit tests for the action's entrypoint, src/index.ts
*/
const { run } = require('../src/main')
// Mock the action's entrypoint
jest.mock('../src/main', () => ({
run: jest.fn()
}))
describe('index', () => {
it('calls run when imported', async () => {
require('../src/index')
expect(run).toHaveBeenCalled()
})
})