Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
},
}
}
)
const App = await importApp(overrides);
const clientOptions = { slackApiUrl: 'proxy.slack.com' };
new App({ authorize: noopAuthorize, signingSecret: '', logLevel: LogLevel.ERROR, clientOptions });
assert.ok(fakeConstructor.called);
const [token, options] = fakeConstructor.lastCall.args;
assert.strictEqual(undefined, token, 'token should be undefined');
assert.strictEqual(clientOptions.slackApiUrl, options.slackApiUrl);
assert.strictEqual(LogLevel.ERROR, options.logLevel, 'override logLevel');
})
// TODO: tests for ignoreSelf option
const overrides = mergeOverrides(
withNoopAppMetadata(),
{
'@slack/web-api': {
WebClient: class {
constructor() {
fakeConstructor(...arguments)
}
},
}
}
)
const App = await importApp(overrides);
const clientOptions = { slackApiUrl: 'proxy.slack.com' };
new App({ authorize: noopAuthorize, signingSecret: '', logLevel: LogLevel.ERROR, clientOptions });
assert.ok(fakeConstructor.called);
const [token, options] = fakeConstructor.lastCall.args;
assert.strictEqual(undefined, token, 'token should be undefined');
assert.strictEqual(clientOptions.slackApiUrl, options.slackApiUrl);
assert.strictEqual(LogLevel.ERROR, options.logLevel, 'override logLevel');
})
// TODO: tests for ignoreSelf option