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:
parent
9f2cd38019
commit
7ca7451a24
@ -14,6 +14,7 @@
|
|||||||
"build-backend": "tsc",
|
"build-backend": "tsc",
|
||||||
"pretest": "tsc",
|
"pretest": "tsc",
|
||||||
"test": "ng test && nyc mocha --recursive test",
|
"test": "ng test && nyc mocha --recursive test",
|
||||||
|
"test-backend": "tsc && mocha --recursive test",
|
||||||
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||||
"start": "node ./src/backend/index",
|
"start": "node ./src/backend/index",
|
||||||
"run-dev": "ng build --configuration=dev",
|
"run-dev": "ng build --configuration=dev",
|
||||||
|
@ -23,7 +23,7 @@ describe('DiskMangerWorker', () => {
|
|||||||
ProjectPath.ImageFolder = path.join(__dirname, '/../../../assets');
|
ProjectPath.ImageFolder = path.join(__dirname, '/../../../assets');
|
||||||
const dir = await DiskMangerWorker.scanDirectory('/');
|
const dir = await DiskMangerWorker.scanDirectory('/');
|
||||||
// should match the number of media (photo/video) files in the assets folder
|
// 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 expected = require(path.join(__dirname, '/../../../assets/test image öüóőúéáű-.,.json'));
|
||||||
const i = dir.media.findIndex(m => m.name === 'test image öüóőúéáű-.,.jpg');
|
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');
|
expect(Utils.clone(dir.media[i].name)).to.be.deep.equal('test image öüóőúéáű-.,.jpg');
|
Loading…
Reference in New Issue
Block a user