From e2550aaf78fd5daa11bc7799bbb7c170de56d818 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 17 Mar 2020 00:21:05 +0000 Subject: [PATCH] fix(core): update --- test/test.ts | 7 +++---- ts/smartarchive.paths.ts | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test.ts b/test/test.ts index 3cdd02b..95dacba 100644 --- a/test/test.ts +++ b/test/test.ts @@ -11,14 +11,13 @@ const testPlugins = { }; const testPaths = { - nogitDir: testPlugins.path.join(process.cwd(), '.nogit/'), - remoteDir: testPlugins.path.join(process.cwd(), '.nogit/remote') + nogitDir: testPlugins.path.join(__dirname, '../.nogit/'), + remoteDir: testPlugins.path.join(__dirname, '../.nogit/remote') }; import * as smartarchive from '../ts/index'; tap.preTask('should prepare .nogit dir', async () => { - await testPlugins.smartfile.fs.ensureDir(testPaths.nogitDir); await testPlugins.smartfile.fs.ensureDir(testPaths.remoteDir); }); @@ -34,7 +33,7 @@ tap.preTask('should prepare downloads', async tools => { ); }); -tap.test('should extract files on disk', async () => { +tap.test('should extract existing files on disk', async () => { const testSmartarchive = new smartarchive.SmartArchive(); await testSmartarchive.extractArchiveFromFilePath( testPlugins.path.join(testPaths.nogitDir, 'test.tgz'), diff --git a/ts/smartarchive.paths.ts b/ts/smartarchive.paths.ts index 5e8277b..be5e516 100644 --- a/ts/smartarchive.paths.ts +++ b/ts/smartarchive.paths.ts @@ -2,3 +2,4 @@ import * as plugins from './smartarchive.plugins'; export const packageDir = plugins.path.join(__dirname, '../'); export const nogitDir = plugins.path.join(__dirname, './.nogit'); +plugins.smartfile.fs.ensureDir(nogitDir);