Skip to content

Commit

Permalink
test/purge: resolve lint exceptions: no-shadow (#1140)
Browse files Browse the repository at this point in the history
The logic as to when indentation should be increased isn't clear to me, but this removes lint exceptions with minimal change to surrounding code.
  • Loading branch information
alxndrsn authored May 7, 2024
1 parent 21582a0 commit d648d9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
Binary file added test/e2e/s3/test-attachments/big.bin
Binary file not shown.
25 changes: 10 additions & 15 deletions test/integration/task/purge.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ describe('task: purge deleted forms', () => {

it('should force purge only specific form', testTask(({ Forms }) =>
Forms.getByProjectAndXmlFormId(1, 'simple')
.then((form) => Forms.del(form.get())
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat'))
// eslint-disable-next-line no-shadow
.then((form) => Forms.del(form.get()))
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat')
.then((form) => Forms.del(form.get())
.then(() => purgeForms(true, 1))
.then((count) => {
Expand All @@ -82,9 +81,8 @@ describe('task: purge deleted forms', () => {

it('should purge specific form', testTask(({ Forms }) =>
Forms.getByProjectAndXmlFormId(1, 'simple')
.then((form) => Forms.del(form.get())
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat'))
// eslint-disable-next-line no-shadow
.then((form) => Forms.del(form.get()))
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat')
.then((form) => Forms.del(form.get())
.then(() => purgeForms(true, 1, 1))
.then((count) => {
Expand All @@ -93,9 +91,8 @@ describe('task: purge deleted forms', () => {

it('should not purge specific form if tied to a different project', testTask(({ Forms }) =>
Forms.getByProjectAndXmlFormId(1, 'simple')
.then((form) => Forms.del(form.get())
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat'))
// eslint-disable-next-line no-shadow
.then((form) => Forms.del(form.get()))
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat')
.then((form) => Forms.del(form.get())
.then(() => purgeForms(true, 1, 2))
.then((count) => {
Expand All @@ -104,9 +101,8 @@ describe('task: purge deleted forms', () => {

it('should not purge all forms if no form ID supplied', testTask(({ Forms }) =>
Forms.getByProjectAndXmlFormId(1, 'simple')
.then((form) => Forms.del(form.get())
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat'))
// eslint-disable-next-line no-shadow
.then((form) => Forms.del(form.get()))
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat')
.then((form) => Forms.del(form.get())
.then(() => purgeForms(true, null, 1))
.then((count) => {
Expand All @@ -115,9 +111,8 @@ describe('task: purge deleted forms', () => {

it('should not purge multiple forms if tied to a different project', testTask(({ Forms }) =>
Forms.getByProjectAndXmlFormId(1, 'simple')
.then((form) => Forms.del(form.get())
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat'))
// eslint-disable-next-line no-shadow
.then((form) => Forms.del(form.get()))
.then(() => Forms.getByProjectAndXmlFormId(1, 'withrepeat')
.then((form) => Forms.del(form.get())
.then(() => purgeForms(true, null, 2))
.then((count) => {
Expand Down

0 comments on commit d648d9d

Please sign in to comment.