From e16b36a2a6d1dc952440fb5e29d2faa908357233 Mon Sep 17 00:00:00 2001 From: Christophe Braud Date: Thu, 24 May 2018 10:06:31 +0200 Subject: [PATCH] testfix :/ --- lib/storages/local.js | 26 +++++++++++++------------- test/config/test.js | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/storages/local.js b/lib/storages/local.js index aa558b4..9da5952 100644 --- a/lib/storages/local.js +++ b/lib/storages/local.js @@ -54,19 +54,19 @@ class LocalAssetStorage extends AssetStorage { }); } - destination() { - const now = new Date(); - let month = now.getMonth() + 1; - month = (month < 10) ? '0' + month : month.toString(); - const relativePath = now.getFullYear().toString() + '/' + month; - const asbolutePath = path.join(this.options.dataPath, relativePath); - return new Promise((resolve) => { - mkdirp(asbolutePath, () => resolve({ - rel: relativePath, - abs: asbolutePath - })); - }); - } + destination () { + const now = new Date(); + let month = now.getMonth() + 1; + month = (month < 10) ? '0' + month : month.toString(); + const relativePath = now.getFullYear().toString() + '/' + month; + const asbolutePath = path.join(this.options.dataPath, relativePath); + return new Promise((resolve) => { + mkdirp(asbolutePath, () => resolve({ + rel: relativePath, + abs: asbolutePath + })); + }); + } getAssetURL (asset) { return '{}{}'.format(this.options.baseUrl, asset.url); diff --git a/test/config/test.js b/test/config/test.js index 4979951..35a42b4 100644 --- a/test/config/test.js +++ b/test/config/test.js @@ -1,6 +1,6 @@ const path = require('path'); const LocalAssetStorage = require('../../lib/storages/local'); -const host = 'http://localhost:3006'; +const host = 'http://localhost:3000'; const storageProviders = { local: new LocalAssetStorage({ name: 'local',