Skip to content

Commit bbde13c

Browse files
tests updated based on feedback
1 parent 647d6bc commit bbde13c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

__tests__/functions/trigger-check.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ test('checks a message and finds a global trigger', async () => {
3434
const body = 'I want to .deploy'
3535
const trigger = '.deploy'
3636
expect(await triggerCheck(body, trigger)).toBe(false)
37+
expect(debugMock).toHaveBeenCalledWith(
38+
`comment body does not start with trigger: ${color}.deploy${colorReset}`
39+
)
3740
})
3841

3942
test('checks a message and finds a trigger with an environment and a variable', async () => {
@@ -66,6 +69,9 @@ test('does not match when immediately followed by alphanumeric', async () => {
6669
const body = '.deploy1'
6770
const trigger = '.deploy'
6871
expect(await triggerCheck(body, trigger)).toBe(false)
72+
expect(debugMock).toHaveBeenCalledWith(
73+
`comment body starts with trigger but is not complete: ${color}.deploy${colorReset}`
74+
)
6975
})
7076

7177
test('matches when followed by a newline (whitespace)', async () => {

0 commit comments

Comments
 (0)