We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44eb8c4 commit 6ce042fCopy full SHA for 6ce042f
__tests__/action.test.js
@@ -66,4 +66,23 @@ describe('action', () => {
66
'Github token is required for push, commit, create an issue and discovery operations!'
67
)
68
})
69
+
70
+ it('should throw an error if discovery is enabled but no organizations are provided', async () => {
71
+ getInputMock.mockImplementation(name => {
72
+ if (name === 'github-token') {
73
+ return 'ghp_obj_obj'
74
+ }
75
+ if (name === 'discovery-enabled') {
76
+ return 'true'
77
78
79
+ return ''
80
+ })
81
+ await main.run()
82
83
+ expect(runMock).toHaveReturned()
84
+ expect(setFailedMock).toHaveBeenNthCalledWith(1,
85
+ 'Discovery is enabled but no organizations were provided!'
86
+ )
87
88
0 commit comments