mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
fixing tests
This commit is contained in:
parent
dab32f72f4
commit
e7cb6311a9
@ -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;
|
||||
}
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user