fix(core): update

This commit is contained in:
Philipp Kunz 2020-03-17 00:21:05 +00:00
parent 3d30f41f84
commit e2550aaf78
2 changed files with 4 additions and 4 deletions

View File

@ -11,14 +11,13 @@ const testPlugins = {
}; };
const testPaths = { const testPaths = {
nogitDir: testPlugins.path.join(process.cwd(), '.nogit/'), nogitDir: testPlugins.path.join(__dirname, '../.nogit/'),
remoteDir: testPlugins.path.join(process.cwd(), '.nogit/remote') remoteDir: testPlugins.path.join(__dirname, '../.nogit/remote')
}; };
import * as smartarchive from '../ts/index'; import * as smartarchive from '../ts/index';
tap.preTask('should prepare .nogit dir', async () => { tap.preTask('should prepare .nogit dir', async () => {
await testPlugins.smartfile.fs.ensureDir(testPaths.nogitDir);
await testPlugins.smartfile.fs.ensureDir(testPaths.remoteDir); 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(); const testSmartarchive = new smartarchive.SmartArchive();
await testSmartarchive.extractArchiveFromFilePath( await testSmartarchive.extractArchiveFromFilePath(
testPlugins.path.join(testPaths.nogitDir, 'test.tgz'), testPlugins.path.join(testPaths.nogitDir, 'test.tgz'),

View File

@ -2,3 +2,4 @@ import * as plugins from './smartarchive.plugins';
export const packageDir = plugins.path.join(__dirname, '../'); export const packageDir = plugins.path.join(__dirname, '../');
export const nogitDir = plugins.path.join(__dirname, './.nogit'); export const nogitDir = plugins.path.join(__dirname, './.nogit');
plugins.smartfile.fs.ensureDir(nogitDir);