Skip to content

Commit 6d85540

Browse files
test(unit): globally mock verifyWebhook to bypass signature validation in tests
1 parent 22aaf29 commit 6d85540

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

functions/slack/test/unit.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ const restoreConsole = function () {
9999
};
100100
beforeEach(stubConsole);
101101
afterEach(restoreConsole);
102+
before(async () => {
103+
const mod = require('../index.js');
104+
mod.verifyWebhook = () => {};
105+
});
102106

103107
describe('functions_slack_search', () => {
104108
before(async () => {

0 commit comments

Comments
 (0)