test: update before and after scripts to not include old database folder
This commit is contained in:
parent
8a5472e9ee
commit
f28e938a4d
|
@ -1,5 +1,4 @@
|
|||
import 'mocha';
|
||||
import { databaseBackupDirectory, databaseDirectory, moveDir, storeBackupDirectory, storeDirectory } from './before';
|
||||
import { moveDir, storeBackupDirectory, storeDirectory } from './before';
|
||||
|
||||
moveDir(storeBackupDirectory, storeDirectory);
|
||||
moveDir(databaseBackupDirectory, databaseDirectory);
|
||||
|
|
|
@ -5,9 +5,6 @@ import path from 'path';
|
|||
export const storeDirectory = path.resolve('store');
|
||||
export const storeBackupDirectory = path.resolve('store-backup');
|
||||
|
||||
export const databaseDirectory = path.resolve('database');
|
||||
export const databaseBackupDirectory = path.resolve('database-backup');
|
||||
|
||||
export function moveDir(fromDir: string, toDir: string) {
|
||||
if (fs.existsSync(fromDir)) {
|
||||
if (fs.existsSync(toDir)) {
|
||||
|
@ -18,4 +15,3 @@ export function moveDir(fromDir: string, toDir: string) {
|
|||
}
|
||||
|
||||
moveDir(storeDirectory, storeBackupDirectory);
|
||||
moveDir(databaseDirectory, databaseBackupDirectory);
|
||||
|
|
Loading…
Reference in New Issue