forked from mirrors/probot
fix: `createProbot() without options
This commit is contained in:
parent
d315f0c2b6
commit
8c01e90ecc
|
@ -33,7 +33,7 @@ const DEFAULTS = {
|
||||||
* @param overrides overwrites defaults and according environment variables
|
* @param overrides overwrites defaults and according environment variables
|
||||||
* @param env defaults to process.env
|
* @param env defaults to process.env
|
||||||
*/
|
*/
|
||||||
export function createProbot(options: Options | CreateProbotOptions) {
|
export function createProbot(options: Options | CreateProbotOptions = {}) {
|
||||||
if (isDeprecated(options)) {
|
if (isDeprecated(options)) {
|
||||||
return deprecatedCreateProbot(options);
|
return deprecatedCreateProbot(options);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,11 @@ describe("Deprecations", () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("createProbot() without options", () => {
|
||||||
|
const probot = createProbot();
|
||||||
|
expect(probot).toBeInstanceOf(Probot);
|
||||||
|
});
|
||||||
|
|
||||||
it("probot.webhook", () => {
|
it("probot.webhook", () => {
|
||||||
const probot = new Probot({ log: pino(streamLogsToOutput) });
|
const probot = new Probot({ log: pino(streamLogsToOutput) });
|
||||||
expect(probot).toBeInstanceOf(Probot);
|
expect(probot).toBeInstanceOf(Probot);
|
||||||
|
|
Loading…
Reference in New Issue