Files
Draupnir/apps/draupnir/test/appservice/integration/listUnstartedDraupnirTest.ts
Gnuxie b63ab3ce89
Docker Hub - Develop / docker-latest (push) Canceled after 0s
GHCR - Development Branches / ghcr-publish (push) Canceled after 0s
Tests / Build & Lint (push) Canceled after 0s
Tests / Unit tests (push) Canceled after 0s
Tests / Integration tests (push) Canceled after 0s
Tests / Application Service Integration tests (push) Canceled after 0s
Validate Docker Build / validate-docker-build (push) Canceled after 0s
Remove the aliases for the matrix-protection-suite packages. (#1162)
* Remove old matrix-protection-suite package aliases.

This was leading to issues with monorepo package management.
https://github.com/the-draupnir-project/Draupnir/issues/1124

* Fix badly imported symbols from packages that already export them.

* Cleanup build command arguments.

There was a deprecation warning for short workspaces flag.
2026-07-18 12:12:57 +00:00

42 lines
1.4 KiB
TypeScript

// Copyright 2022 Gnuxie <Gnuxie@protonmail.com>
//
// SPDX-License-Identifier: Apache-2.0
import expect from "expect";
import { MjolnirAppService } from "../../../src/appservice/AppService";
import { setupHarness } from "../utils/harness";
import { isError } from "@the-draupnir-project/matrix-protection-suite";
import { StringUserID } from "@the-draupnir-project/matrix-basic-types";
interface Context extends Mocha.Context {
appservice?: MjolnirAppService;
}
describe("Just test some commands innit", function () {
beforeEach(async function (this: Context) {
this.appservice = await setupHarness();
});
afterEach(function (this: Context) {
if (this.appservice) {
return this.appservice.close();
} else {
console.warn("Missing Appservice in this context, so cannot stop it.");
return Promise.resolve(); // TS7030: Not all code paths return a value.
}
});
it("Can list any unstarted draupnir", async function (this: Context) {
const appservice = this.appservice;
if (appservice === undefined) {
throw new TypeError(`Test setup failed`);
}
const result = await appservice.commands.sendTextCommand(
"@test:localhost:9999" as StringUserID,
"!admin list unstarted"
);
if (isError(result)) {
throw new TypeError(`Command should have succeeded`);
}
expect(result.ok).toBeInstanceOf(Array);
});
});