From 7ca7451a24536349959919ce90321c39e6bb9b6b Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sun, 5 Mar 2023 18:49:08 +0100 Subject: [PATCH] Fixing DiskManagerWorker.spec.ts test #516 --- package.json | 1 + .../{DiskMangerWorker.spec.ts => DiskManagerWorker.spec.ts} | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) rename test/backend/unit/model/threading/{DiskMangerWorker.spec.ts => DiskManagerWorker.spec.ts} (96%) diff --git a/package.json b/package.json index a2055f86..86d2f7b4 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "build-backend": "tsc", "pretest": "tsc", "test": "ng test && nyc mocha --recursive test", + "test-backend": "tsc && mocha --recursive test", "coverage": "nyc report --reporter=text-lcov | coveralls", "start": "node ./src/backend/index", "run-dev": "ng build --configuration=dev", diff --git a/test/backend/unit/model/threading/DiskMangerWorker.spec.ts b/test/backend/unit/model/threading/DiskManagerWorker.spec.ts similarity index 96% rename from test/backend/unit/model/threading/DiskMangerWorker.spec.ts rename to test/backend/unit/model/threading/DiskManagerWorker.spec.ts index 80289d70..cf4387a4 100644 --- a/test/backend/unit/model/threading/DiskMangerWorker.spec.ts +++ b/test/backend/unit/model/threading/DiskManagerWorker.spec.ts @@ -23,7 +23,7 @@ describe('DiskMangerWorker', () => { ProjectPath.ImageFolder = path.join(__dirname, '/../../../assets'); const dir = await DiskMangerWorker.scanDirectory('/'); // should match the number of media (photo/video) files in the assets folder - expect(dir.media.length).to.be.equals(8); + expect(dir.media.length).to.be.equals(9); const expected = require(path.join(__dirname, '/../../../assets/test image öüóőúéáű-.,.json')); const i = dir.media.findIndex(m => m.name === 'test image öüóőúéáű-.,.jpg'); expect(Utils.clone(dir.media[i].name)).to.be.deep.equal('test image öüóőúéáű-.,.jpg');