Skip to content

Commit

Permalink
test(legacy): Call isdone() unconditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 30, 2024
1 parent 66d6fc1 commit f69a47a
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions bids-validator/tests/bids.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ describe('BIDS example datasets ', function () {
} else {
assert.deepEqual(session_flag, true)
}
isdone()
},
)
isdone()

Check failure on line 92 in bids-validator/tests/bids.spec.js

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 18)

Insert `··`

Check failure on line 92 in bids-validator/tests/bids.spec.js

View workflow job for this annotation

GitHub Actions / build (macos-latest, 18)

Insert `··`

Check failure on line 92 in bids-validator/tests/bids.spec.js

View workflow job for this annotation

GitHub Actions / build (windows-latest, 18)

Insert `··`
})
})
})
Expand All @@ -113,9 +113,9 @@ describe('BIDS example datasets ', function () {
warnings.findIndex((warning) => warning.code === 13) > -1,
'warnings do not contain a code 13',
)
isdone()
},
)
isdone()
})

// we need to have at least one non-dynamic test
Expand Down Expand Up @@ -147,9 +147,9 @@ describe('BIDS example datasets ', function () {
participantId: '01',
sex: 'M',
})
isdone()
},
)
isdone()
})

// test for duplicate files present with both .nii and .nii.gz extension
Expand All @@ -159,16 +159,16 @@ describe('BIDS example datasets ', function () {
enableNiftiHeaders,
function (issues) {
assertErrorCode(issues.errors, 74)
isdone()
},
)
isdone()
})

it('includes issue 53 NO_T1W for dataset without T1w files', function (isdone) {
validate.BIDS(createDatasetFileList('no_t1w'), options, function (issues) {
assertErrorCode(issues.ignored, 53)
isdone()
})
isdone()
})

// test for illegal characters used in acq and task name
Expand All @@ -178,9 +178,9 @@ describe('BIDS example datasets ', function () {
enableNiftiHeaders,
function (issues) {
assertErrorCode(issues.errors, 58)
isdone()
},
)
isdone()
})

// test for illegal characters used in sub name
Expand All @@ -190,9 +190,9 @@ describe('BIDS example datasets ', function () {
enableNiftiHeaders,
function (issues) {
assertErrorCode(issues.errors, 64)
isdone()
},
)
isdone()
})

it('checks for subjects with no valid data', function (isdone) {
Expand All @@ -201,9 +201,9 @@ describe('BIDS example datasets ', function () {
options,
function (issues) {
assertErrorCode(issues.errors, 67)
isdone()
},
)
isdone()
})

it('validates MRI modalities', function (isdone) {
Expand All @@ -224,9 +224,9 @@ describe('BIDS example datasets ', function () {
warnings.findIndex((warning) => warning.code === 13) > -1,
'warnings do not contain a code 13',
)
isdone()
},
)
isdone()
})

it('blacklists modalities specified', function (isdone) {
Expand All @@ -253,9 +253,9 @@ describe('BIDS example datasets ', function () {
'errors do contain a code 139',
)

Check failure on line 254 in bids-validator/tests/bids.spec.js

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 18)

Delete `⏎`

Check failure on line 254 in bids-validator/tests/bids.spec.js

View workflow job for this annotation

GitHub Actions / build (macos-latest, 18)

Delete `⏎`

Check failure on line 254 in bids-validator/tests/bids.spec.js

View workflow job for this annotation

GitHub Actions / build (windows-latest, 18)

Delete `⏎`

isdone()
},
)
isdone()
})

it('checks for data dictionaries without corresponding data files', function (isdone) {
Expand All @@ -267,9 +267,9 @@ describe('BIDS example datasets ', function () {
issues.errors.findIndex((issue) => issue.code === 90),
-1,
)
isdone()
},
)
isdone()
})

it('checks for fieldmaps with no _magnitude file', function (isdone) {
Expand All @@ -281,9 +281,9 @@ describe('BIDS example datasets ', function () {
issues.errors.findIndex((issue) => issue.code === 91),
-1,
)
isdone()
},
)
isdone()
})

it('should not throw a warning if all _phasediff.nii are associated with _magnitude1.nii', function (isdone) {
Expand All @@ -292,9 +292,9 @@ describe('BIDS example datasets ', function () {
options,
function (issues) {
assert.deepEqual(issues.errors, [])
isdone()
},
)
isdone()
})

it('should throw a warning if there are _phasediff.nii without an associated _magnitude1.nii', function (isdone) {
Expand All @@ -303,9 +303,9 @@ describe('BIDS example datasets ', function () {
options,
function (issues) {
assert.notEqual(issues.warnings.findIndex((issue) => issue.code === 92))
isdone()
},
)
isdone()
})

it('should not throw an error if it encounters no non-utf-8 files', function (isdone) {
Expand All @@ -317,9 +317,9 @@ describe('BIDS example datasets ', function () {
issues.errors.findIndex((issue) => issue.code === 123),
-1,
)
isdone()
},
)
isdone()
})

it('should validate pet data', function (isdone) {
Expand All @@ -328,9 +328,9 @@ describe('BIDS example datasets ', function () {
options,
function (issues) {
assertErrorCode(issues.errors, 55)
isdone()
},
)
isdone()
})

it('should validate pet blood data', function (isdone) {
Expand All @@ -339,9 +339,9 @@ describe('BIDS example datasets ', function () {
options,
function (issues) {
assertErrorCode(issues.errors, 55)
isdone()
},
)
isdone()
})

it('should catch missing tsv columns', function (isdone) {
Expand All @@ -350,8 +350,8 @@ describe('BIDS example datasets ', function () {
options,
function (issues) {
assertErrorCode(issues.errors, 211)
isdone()
},
)
isdone()
})
})

0 comments on commit f69a47a

Please sign in to comment.