From d56a49012188e372edc81adb7ac5390c4c54ca37 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 25 May 2021 10:24:49 +0100 Subject: [PATCH] [misc] AllowedImageNamesTests: add missing done callbacks --- ...ImageNames.js => AllowedImageNamesTests.js} | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) rename services/clsi/test/acceptance/js/{AllowedImageNames.js => AllowedImageNamesTests.js} (88%) diff --git a/services/clsi/test/acceptance/js/AllowedImageNames.js b/services/clsi/test/acceptance/js/AllowedImageNamesTests.js similarity index 88% rename from services/clsi/test/acceptance/js/AllowedImageNames.js rename to services/clsi/test/acceptance/js/AllowedImageNamesTests.js index 8107273fe0..06304a808d 100644 --- a/services/clsi/test/acceptance/js/AllowedImageNames.js +++ b/services/clsi/test/acceptance/js/AllowedImageNamesTests.js @@ -75,7 +75,7 @@ Hello world beforeEach(function (done) { Client.compile(this.project_id, this.request, done) }) - it('should error out with an invalid imageName', function () { + it('should error out with an invalid imageName', function (done) { Client.syncFromCodeWithImage( this.project_id, 'main.tex', @@ -85,11 +85,12 @@ Hello world (error, body) => { expect(String(error)).to.include('statusCode=400') expect(body).to.equal('invalid image') + done() } ) }) - it('should produce a mapping a valid imageName', function () { + it('should produce a mapping a valid imageName', function (done) { Client.syncFromCodeWithImage( this.project_id, 'main.tex', @@ -103,6 +104,7 @@ Hello world { page: 1, h: 133.77, v: 134.76, height: 6.92, width: 343.71 } ] }) + done() } ) }) @@ -112,7 +114,7 @@ Hello world beforeEach(function (done) { Client.compile(this.project_id, this.request, done) }) - it('should error out with an invalid imageName', function () { + it('should error out with an invalid imageName', function (done) { Client.syncFromPdfWithImage( this.project_id, 'main.tex', @@ -122,11 +124,12 @@ Hello world (error, body) => { expect(String(error)).to.include('statusCode=400') expect(body).to.equal('invalid image') + done() } ) }) - it('should produce a mapping a valid imageName', function () { + it('should produce a mapping a valid imageName', function (done) { Client.syncFromPdfWithImage( this.project_id, 1, @@ -138,6 +141,7 @@ Hello world expect(result).to.deep.equal({ code: [{ file: 'main.tex', line: 3, column: -1 }] }) + done() } ) }) @@ -147,7 +151,7 @@ Hello world beforeEach(function (done) { Client.compile(this.project_id, this.request, done) }) - it('should error out with an invalid imageName', function () { + it('should error out with an invalid imageName', function (done) { Client.wordcountWithImage( this.project_id, 'main.tex', @@ -155,11 +159,12 @@ Hello world (error, body) => { expect(String(error)).to.include('statusCode=400') expect(body).to.equal('invalid image') + done() } ) }) - it('should produce a texcout a valid imageName', function () { + it('should produce a texcout a valid imageName', function (done) { Client.wordcountWithImage( this.project_id, 'main.tex', @@ -168,6 +173,7 @@ Hello world expect(error).to.not.exist expect(result).to.exist expect(result.texcount).to.exist + done() } ) })