fix(core): update
This commit is contained in:
parent
3d30f41f84
commit
e2550aaf78
@ -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'),
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user