From 466b556a5e1b62363a2cb8846e4b046553401498 Mon Sep 17 00:00:00 2001 From: Nazar Duchak Date: Mon, 24 Aug 2020 18:25:52 +0300 Subject: [PATCH] chore: fix lint --- src/utils.ts | 2 +- test/db-backup-restore.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 6cffb3b7..8898f95c 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -225,7 +225,7 @@ function parseBackUps (backUpName: string): BackUpEntry { function getBackUps (): BackUpEntry[] { const backupConfig = config.get('dbBackUp') - const backups = fs.readdirSync(path.resolve(__dirname, '../' + backupConfig.path)) + const backups = fs.readdirSync(path.resolve(__dirname, `../${backupConfig.path}`)) if (backups.length) { return backups diff --git a/test/db-backup-restore.ts b/test/db-backup-restore.ts index 314a43ba..b47ce416 100644 --- a/test/db-backup-restore.ts +++ b/test/db-backup-restore.ts @@ -57,8 +57,8 @@ describe('DB back-up/restore', function () { eth.getBlock(Arg.all()).rejects(new Error('Not found')) const backupJob = new DbBackUpJob(eth) - fs.writeFileSync(path.resolve(backupPath, `0x0123:10-${db}`), 'First backup') - fs.writeFileSync(path.resolve(backupPath, `0x0123:20-${db}`), 'Second backup') + fs.writeFileSync(path.resolve(backupPath, `0x0123:10-${db}`), 'First ') + fs.writeFileSync(path.resolve(backupPath, `0x0123:20-${db}`), 'Second') expect(fs.readdirSync(backupPath).length).to.be.eql(2) await expect(backupJob.restoreDb(errorCallBack)).to.eventually.be.rejectedWith( @@ -82,8 +82,8 @@ describe('DB back-up/restore', function () { const backupJob = new DbBackUpJob(eth) eth.getBlock('0x0123').resolves(blockMock(10)) - fs.writeFileSync(path.resolve(backupPath, `0x0123:10-${db}`), 'First backup') - fs.writeFileSync(path.resolve(backupPath, `0x01234:20-${db}`), 'Second backup') + fs.writeFileSync(path.resolve(backupPath, `0x0123:10-${db}`), 'First db backup') + fs.writeFileSync(path.resolve(backupPath, `0x01234:20-${db}`), 'Second db backup') expect(fs.readdirSync(backupPath).length).to.be.eql(2) await backupJob.restoreDb(errorCallBack)