From 38f69b23031f470942ad261d64e315264aaa49f2 Mon Sep 17 00:00:00 2001
From: Benedikt Magnus <magnus@magnuscraft.de>
Date: Sun, 7 Nov 2021 11:36:32 +0100
Subject: [PATCH] Disabled @typescript-eslint/require-await rule for all tests.

---
 tests/.eslintrc.json                      |  3 ++-
 tests/tests/messages/statelessCommands.ts | 10 +++++-----
 tests/tests/wichtelbot.message.handler.ts | 12 ++++++------
 tests/utility/message.ts                  |  1 -
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tests/.eslintrc.json b/tests/.eslintrc.json
index ad5d219..5e6d494 100644
--- a/tests/.eslintrc.json
+++ b/tests/.eslintrc.json
@@ -17,6 +17,7 @@
     "rules": {
         "@typescript-eslint/no-empty-function": "off",
         "@typescript-eslint/no-unsafe-argument": "off",
-        "@typescript-eslint/no-unsafe-assignment": "off"
+        "@typescript-eslint/no-unsafe-assignment": "off",
+        "@typescript-eslint/require-await": "off"
     }
 }
diff --git a/tests/tests/messages/statelessCommands.ts b/tests/tests/messages/statelessCommands.ts
index c75bf41..526949e 100644
--- a/tests/tests/messages/statelessCommands.ts
+++ b/tests/tests/messages/statelessCommands.ts
@@ -49,7 +49,7 @@ describe('statelessCommands',
                 let called = false;
                 let author: User;
 
-                const resultCallback = async (text: string): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (text: string): Promise<void> =>
                 {
                     assert.strictEqual(text, Localisation.texts.goodAfternoon.process(author));
                     called = true;
@@ -72,7 +72,7 @@ describe('statelessCommands',
                 let called = false;
                 let author: User;
 
-                const resultCallback = async (text: string): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (text: string): Promise<void> =>
                 {
                     assert.strictEqual(text, Localisation.texts.goodMorning.process(author));
                     called = true;
@@ -95,7 +95,7 @@ describe('statelessCommands',
                 let called = false;
                 let author: User;
 
-                const resultCallback = async (text: string): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (text: string): Promise<void> =>
                 {
                     assert.strictEqual(text, Localisation.texts.goodNight.process(author));
                     called = true;
@@ -118,7 +118,7 @@ describe('statelessCommands',
                 let called = false;
                 let author: User;
 
-                const resultCallback = async (text: string): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (text: string): Promise<void> =>
                 {
                     assert.strictEqual(text, Localisation.texts.hello.process(author));
                     called = true;
@@ -141,7 +141,7 @@ describe('statelessCommands',
                 let called = false;
                 let author: User;
 
-                const resultCallback = async (text: string): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (text: string): Promise<void> =>
                 {
                     assert.strictEqual(text, Localisation.texts.maybeResponse.process(author));
                     called = true;
diff --git a/tests/tests/wichtelbot.message.handler.ts b/tests/tests/wichtelbot.message.handler.ts
index a380c0d..b68a58e 100644
--- a/tests/tests/wichtelbot.message.handler.ts
+++ b/tests/tests/wichtelbot.message.handler.ts
@@ -46,7 +46,7 @@ describe('message handler',
         it('does not answer bots.',
             async function ()
             {
-                const resultCallback = async (): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (): Promise<void> =>
                 {
                     assert.fail('The bot must not answer bot messages!');
                 };
@@ -62,7 +62,7 @@ describe('message handler',
         it('does not answer in ignored channel types.',
             async function ()
             {
-                const resultCallback = async (): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (): Promise<void> =>
                 {
                     assert.fail('The bot must not answer in ignored channels!');
                 };
@@ -78,7 +78,7 @@ describe('message handler',
         it('does not answer non-prefixed server messages.',
             async function ()
             {
-                const resultCallback = async (): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (): Promise<void> =>
                 {
                     assert.fail('The bot must not answer non-prefixed server messages!');
                 };
@@ -98,7 +98,7 @@ describe('message handler',
                 let called = false;
                 let author: User;
 
-                const resultCallback = async (text: string): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (text: string): Promise<void> =>
                 {
                     assert.strictEqual(text, Localisation.texts.contactingRegistration.process(author));
                     called = true;
@@ -119,7 +119,7 @@ describe('message handler',
                 let called = false;
                 let author: User;
 
-                const resultCallback = async (text: string): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (text: string): Promise<void> =>
                 {
                     assert.strictEqual(text, Localisation.texts.notUnderstood.process(author));
                     called = true;
@@ -140,7 +140,7 @@ describe('message handler',
                 let called = false;
                 let author: User;
 
-                const resultCallback = async (text: string): Promise<void> => // eslint-disable-line @typescript-eslint/require-await
+                const resultCallback = async (text: string): Promise<void> =>
                 {
                     const parameters = new KeyValuePairList();
                     parameters.addPair('messageLength', `${message.content.length}`);
diff --git a/tests/utility/message.ts b/tests/utility/message.ts
index cc31484..9975ddf 100644
--- a/tests/utility/message.ts
+++ b/tests/utility/message.ts
@@ -84,7 +84,6 @@ export class CommandTestMessage extends TestMessage
 
     constructor (database: Database, testCallback: TestCallbackContact | TestCallbackMember, channelType: ChannelType)
     {
-        // eslint-disable-next-line @typescript-eslint/require-await
         const resultCallback = async (text: string): Promise<void> =>
         {
             this.called = true;
-- 
GitLab