mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00

* 1.6.1 * Add new error type for validation errors * Validate state for GitHubRepo properly * Add tests to check labels * Also check GitLab repo * changelog * add mock store * remove nullable * Be less strict for existing state * Improve test coverage * Improve expect error text * ValidationApiError now takes falsey objects and errors on them * Remove UserTokenMockStore * Actually commit the new tests * Whoops we need to include github
22 lines
479 B
TypeScript
22 lines
479 B
TypeScript
import { IntentMock } from "./IntentMock";
|
|
|
|
export class AppserviceMock {
|
|
public readonly botIntent = IntentMock.create();
|
|
static create(){
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
return new this() as any;
|
|
}
|
|
|
|
get botUserId() {
|
|
return `@bot:example.com`;
|
|
}
|
|
|
|
get botClient() {
|
|
return this.botIntent.underlyingClient;
|
|
}
|
|
|
|
public getIntentForUserId() {
|
|
return IntentMock.create();
|
|
}
|
|
}
|