test: update before and after scripts to not include old database folder

This commit is contained in:
Xymorot 2019-12-11 14:22:22 +01:00
parent 8a5472e9ee
commit f28e938a4d
2 changed files with 1 additions and 6 deletions

View File

@ -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);

View File

@ -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);