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

fixing tests

This commit is contained in:
Braun Patrik 2017-06-04 18:45:29 +02:00
parent dab32f72f4
commit e7cb6311a9
2 changed files with 11 additions and 9 deletions

View File

@ -17,13 +17,15 @@ const pool = new Pool();
const LOG_TAG = "[DiskManager]";
interface PoolInput {
relativeDirectoryName: string;
directoryName: string;
directoryParent: string;
absoluteDirectoryName: string;
}
pool.run(
(input: {
relativeDirectoryName: string,
directoryName: string,
directoryParent: string,
absoluteDirectoryName: string
}, done) => {
(input: PoolInput, done) => {
const fs = require("fs");
const path = require("path");
const mime = require("mime");
@ -153,7 +155,6 @@ pool.run(
promises.push(promise);
} else if (isImage(fullFilePath)) {
let promise = loadPhotoMetadata(fullFilePath).then((photoMetadata) => {
directory.photos.push(<PhotoDTO>{
name: file,
@ -161,8 +162,8 @@ pool.run(
metadata: photoMetadata
});
});
promises.push(promise);
if (maxPhotos != null && promises.length > maxPhotos) {
break;
}

View File

@ -51,6 +51,7 @@ module.exports = function(config) {
{pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false},
//Other libs
{pattern: 'node_modules/ng2-cookies/**/*.js', included: false, watched: false},
{pattern: 'node_modules/typeconfig/**/*.js', included: false, watched: false},
// Paths loaded via module imports: