eslint: add no-shadow

This commit is contained in:
Girish Ramakrishnan
2026-02-18 08:18:37 +01:00
parent 4d3e9dc49b
commit 4ed6fbbd74
40 changed files with 250 additions and 249 deletions
+7 -7
View File
@@ -97,10 +97,10 @@ describe('Storage', function () {
it('can download file', async function () {
const sourceFile = path.join(gBackupConfig.backupDir, gBackupConfig.prefix, '/uploadtest/test.txt');
const [error, stream] = await safe(filesystem.download(gBackupConfig, 'uploadtest/test.txt'));
const [error, downloadStream] = await safe(filesystem.download(gBackupConfig, 'uploadtest/test.txt'));
expect(error).to.be(null);
expect(stream).to.be.an('object');
const data = await consumers.buffer(stream);
expect(downloadStream).to.be.an('object');
const data = await consumers.buffer(downloadStream);
expect(fs.readFileSync(sourceFile)).to.eql(data); // buffer compare
});
@@ -314,8 +314,8 @@ describe('Storage', function () {
}
file(key) { // already has prefix
// console.log('gcs file object:', key);
function getFullWritablePath(key) {
const fullPath = path.join(bucketPathNoPrefix, key);
function getFullWritablePath(keyPath) {
const fullPath = path.join(bucketPathNoPrefix, keyPath);
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
return fullPath;
}
@@ -390,9 +390,9 @@ describe('Storage', function () {
it('can download file', async function () {
const sourceKey = 'uploadtest/test.txt';
const [error, stream] = await safe(gcs.download(backupConfig, sourceKey));
const [error, downloadStream] = await safe(gcs.download(backupConfig, sourceKey));
expect(error).to.be(null);
expect(stream).to.be.an('object');
expect(downloadStream).to.be.an('object');
});
it('list dir lists contents of source dir', async function () {