Upgrade some deps: helmet, slack, amplitude and short-uuid (#12817)
* upgrade helmet to version 4 * deps(short-uuid): upgrade to version 4, closes #12573 * deps(slack): upgrade to version 4 * deps(slack): upgrade to version 5, closes #11442 * deps(amplitude): upgrade to latest version use api v2 * fix tests * slack tests: return promise * refactor slack setup for tests * fix slack unit tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IncomingWebhook } from '@slack/client';
|
||||
import { IncomingWebhook } from '@slack/webhook';
|
||||
import nconf from 'nconf';
|
||||
import { v4 as generateUUID } from 'uuid';
|
||||
import {
|
||||
@@ -133,7 +133,7 @@ describe('POST /chat', () => {
|
||||
describe('shadow-mute user', () => {
|
||||
beforeEach(() => {
|
||||
sandbox.spy(email, 'sendTxn');
|
||||
sandbox.stub(IncomingWebhook.prototype, 'send');
|
||||
sandbox.stub(IncomingWebhook.prototype, 'send').returns(Promise.resolve());
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -355,7 +355,7 @@ describe('POST /chat', () => {
|
||||
context('banned slur', () => {
|
||||
beforeEach(() => {
|
||||
sandbox.spy(email, 'sendTxn');
|
||||
sandbox.stub(IncomingWebhook.prototype, 'send');
|
||||
sandbox.stub(IncomingWebhook.prototype, 'send').returns(Promise.resolve());
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user