Skip to content

Commit

Permalink
Revert "test(legacy): Call isdone() unconditionally"
Browse files Browse the repository at this point in the history
This reverts commit 519642e.
  • Loading branch information
effigies committed Oct 30, 2024
1 parent 519642e commit fb90f77
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 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()
})
})
})
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 @@ -252,9 +252,10 @@ describe('BIDS example datasets ', function () {
errors.findIndex((error) => error.code === 139) > -1,
'errors do contain a code 139',
)

isdone()
},
)
isdone()
})

it('checks for data dictionaries without corresponding data files', function (isdone) {
Expand All @@ -266,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 @@ -280,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 @@ -291,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 @@ -302,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 @@ -316,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 @@ -327,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 @@ -338,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 @@ -349,8 +350,8 @@ describe('BIDS example datasets ', function () {
options,
function (issues) {
assertErrorCode(issues.errors, 211)
isdone()
},
)
isdone()
})
})

0 comments on commit fb90f77

Please sign in to comment.