1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Fixing DiskManagerWorker.spec.ts test #516

This commit is contained in:
Patrik J. Braun 2023-03-05 18:49:08 +01:00
parent 9f2cd38019
commit 7ca7451a24
2 changed files with 2 additions and 1 deletions

View File

@ -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",

View File

@ -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');