Skip to content

Commit 770e5ff

Browse files
committed
TST FIX tests according to new specs
1 parent 65f70a3 commit 770e5ff

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

tests/bids.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ function getDirectories(srcpath) {
1616
});
1717
}
1818

19-
var missing_session_files = ['7t_trt', 'ds006', 'ds007', 'ds008', 'ds051', 'ds052', 'ds105', 'ds108', 'ds109', 'ds113b'];
19+
var missing_session_files = ['7t_trt', 'ds006', 'ds007', 'ds008', 'ds051', 'ds052', 'ds105', 'ds108', 'ds109', 'ds113b',
20+
'ds000117'];
2021

2122
function assertErrorCode(errors, expected_error_code) {
2223
var matchingErrors = errors.filter(function (error) {

tests/json.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ describe('JSON', function(){
3838
};
3939

4040
it('*_meg.json sidecars should have required key/value pairs', function(){
41-
var jsonObj = '{"TaskName": "Audiovis", "Manufacturer": "Elekta", "SamplingFrequency": 1000, ' +
42-
'"MEGChannelCount": 306, "MEGREFChannelCount": 0, "EEGChannelCount": 32,' +
43-
'"EOGChannelCount": 1, "ECGChannelCount": 0, "EMGChannelCount": 0,' +
44-
'"MiscChannelCount": 4, "TriggerChannelCount": 4}';
41+
var jsonObj = '{"TaskName": "Audiovis", "SamplingFrequency": 1000, ' +
42+
' "PowerLineFrequency": 50, "DewarPosition": "Upright", ' +
43+
' "SoftwareFilters": "n/a", "DigitizedLandmarks": true,' +
44+
' "DigitizedHeadPoints": false}';
4545
validate.JSON(meg_file, jsonObj, function (issues) {
4646
assert(issues.length === 0);
4747
});
4848

49-
var jsonObjInval = jsonObj.replace(/"EOGChannelCount": 1, /g, '');
49+
var jsonObjInval = jsonObj.replace(/"SamplingFrequency": 1000, /g, '');
5050
validate.JSON(meg_file, jsonObjInval, function(issues){
5151
assert(issues && issues.length === 1);
5252
});

tests/tsv.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,25 +175,25 @@ var channelsFile = {
175175
};
176176

177177
it("should not allow channels.tsv files without name column", function () {
178-
var tsv = 'header-one\ttype\t4eader-three\n' +
178+
var tsv = 'header-one\ttype\tunits\n' +
179179
'value-one\tvalue-two\tvalue-three';
180180
validate.TSV.TSV(channelsFile, tsv, [], function (issues) {
181-
assert(issues.length === 1 && issues[0].code === 68);
181+
assert(issues.length === 1 && issues[0].code === 70);
182182
});
183183
});
184184

185185
it("should not allow channels.tsv files without type column", function () {
186-
var tsv = 'name\theader-two\t4eader-three\n' +
186+
var tsv = 'name\theader-two\tunits\n' +
187187
'value-one\tvalue-two\tvalue-three';
188188
validate.TSV.TSV(channelsFile, tsv, [], function (issues) {
189-
assert(issues.length === 1 && issues[0].code === 69);
189+
assert(issues.length === 1 && issues[0].code === 71);
190190
});
191191
});
192192

193193

194-
it("should allow channels.tsv files with name and type columns", function () {
195-
var tsv = 'name\ttype\t4eader-three\n' +
196-
'value-one\tvalue-two\tvalue-three';
194+
it("should allow channels.tsv files with name, type and units columns", function () {
195+
var tsv = 'name\ttype\tunits\theader-four\n' +
196+
'value-one\tvalue-two\tvalue-three\tvalue-four';
197197
validate.TSV.TSV(channelsFile, tsv, [], function (issues) {
198198
assert(issues.length === 0);
199199
});

0 commit comments

Comments
 (0)