Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nduchak committed Aug 24, 2020
1 parent 0a88d6a commit 466b556
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function parseBackUps (backUpName: string): BackUpEntry {
function getBackUps (): BackUpEntry[] {
const backupConfig = config.get<DbBackUpConfig>('dbBackUp')

const backups = fs.readdirSync(path.resolve(__dirname, '../' + backupConfig.path))
const backups = fs.readdirSync(path.resolve(__dirname, `../${backupConfig.path}`))

if (backups.length) {
return backups
Expand Down
8 changes: 4 additions & 4 deletions test/db-backup-restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
Expand Down

0 comments on commit 466b556

Please sign in to comment.