From b0a089148a15de244e4655dc02c8c1909d438a0d Mon Sep 17 00:00:00 2001
From: Will Hunt <will@half-shot.uk>
Date: Sat, 28 Apr 2018 18:40:14 +0100
Subject: [PATCH] Fix linting

---
 test/test_matrixeventprocessor.ts | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/test/test_matrixeventprocessor.ts b/test/test_matrixeventprocessor.ts
index bedbfd8..67636e3 100644
--- a/test/test_matrixeventprocessor.ts
+++ b/test/test_matrixeventprocessor.ts
@@ -53,7 +53,7 @@ function createMatrixEventProcessor
         "./util": {
             Util: {
                 DownloadFile: (name: string) => {
-                    const size = parseInt(name.substring(name.lastIndexOf("/")+1), undefined);
+                    const size = parseInt(name.substring(name.lastIndexOf("/") + 1), undefined);
                     return Buffer.alloc(size);
                 },
             },
@@ -271,32 +271,34 @@ describe("MatrixEventProcessor", () => {
             }, mxClient)).to.eventually.eq("");
         });
         it("message with a large info.size", () => {
+            const LARGE_FILE = 8000000;
             const processor = createMatrixEventProcessor();
             return expect(processor.HandleAttachment({
                 content: {
                     msgtype: "m.video",
                     info: {
-                        size: 8000000,
+                        size: LARGE_FILE,
                     },
                     body: "filename.webm",
-                    url: "mxc://localhost/8000000"
+                    url: "mxc://localhost/8000000",
                 },
             }, mxClient)).to.eventually.eq("[filename.webm](https://localhost/8000000)");
         });
         it("message with a small info.size", () => {
+            const SMALL_FILE = 200;
             const processor = createMatrixEventProcessor();
             return expect(processor.HandleAttachment({
                 content: {
                     msgtype: "m.video",
                     info: {
-                        size: 200,
+                        size: SMALL_FILE,
                     },
                     body: "filename.webm",
-                    url: "mxc://localhost/200"
+                    url: "mxc://localhost/200",
                 },
             }, mxClient)).to.eventually.satisfy((attachment) => {
                 expect(attachment.name).to.eq("filename.webm");
-                expect(attachment.attachment.length).to.eq(200);
+                expect(attachment.attachment.length).to.eq(SMALL_FILE);
                 return true;
             });
         });
@@ -309,7 +311,7 @@ describe("MatrixEventProcessor", () => {
                         size: 200,
                     },
                     body: "filename.webm",
-                    url: "mxc://localhost/8000000"
+                    url: "mxc://localhost/8000000",
                 },
             }, mxClient)).to.eventually.eq("[filename.webm](https://localhost/8000000)");
         });
-- 
GitLab