hello-world-javascript-action/__tests__/index.test.js

19 lines
337 B
JavaScript
Raw Normal View History

2023-09-15 14:56:32 +00:00
/**
* Unit tests for the action's entrypoint, src/index.js
*/
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()
})
})