Skip to content

Commit c495bdd

Browse files
d-gubertCopilot
andauthored
chore: convert unit tests from Alsatian to NodeJS built-in framework (RocketChat#37592)
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: d-gubert <1810309+d-gubert@users.noreply.github.com>
1 parent e4e8237 commit c495bdd

File tree

128 files changed

+5713
-6118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+5713
-6118
lines changed

packages/apps-engine/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
".:lint:deno": "deno lint --ignore=deno-runtime/.deno deno-runtime/",
5252
".:lint:eslint": "eslint .",
5353
".:test:deno": "cd deno-runtime && deno task test",
54-
".:test:node": "NODE_ENV=test ts-node --transpileOnly ./tests/runner.ts",
54+
".:test:node": "NODE_ENV=test node --require ts-node/register/transpile-only --test-reporter spec --test \"tests/**/*.test.ts\"",
5555
"build": "run-s .:build:clean .:build:default .:build:deno-cache",
5656
"dev": "yarn .:build:default --watch",
5757
"fix-lint": "yarn .:eslint:fix && yarn .:deno-fmt:fix",
@@ -98,7 +98,6 @@
9898
"@types/semver": "^7.5.8",
9999
"@types/stack-trace": "0.0.33",
100100
"@types/uuid": "~10.0.0",
101-
"alsatian": "^2.4.0",
102101
"eslint": "~9.39.3",
103102
"npm-run-all": "^4.1.5",
104103
"nyc": "^17.1.0",

packages/apps-engine/src/server/accessors/SlashCommandsExtend.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class SlashCommandsExtend implements ISlashCommandsExtend {
88
private readonly appId: string,
99
) {}
1010

11-
public provideSlashCommand(slashCommand: ISlashCommand): Promise<void> {
12-
return Promise.resolve(this.manager.addCommand(this.appId, slashCommand));
11+
public async provideSlashCommand(slashCommand: ISlashCommand): Promise<void> {
12+
await this.manager.addCommand(this.appId, slashCommand);
1313
}
1414
}

packages/apps-engine/tests/runner.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/apps-engine/tests/server/AppManager.spec.ts

Lines changed: 0 additions & 273 deletions
This file was deleted.

0 commit comments

Comments
 (0)