Skip to content

Commit 78e409d

Browse files
authored
Merge pull request #390 from naveau/patch-issue-370
Check that slice timing values are greater or equal than zero
2 parents 3730364 + 9458324 commit 78e409d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/json.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,11 @@ describe('JSON', function(){
2424
assert(issues && issues.length === 1);
2525
});
2626
});
27+
28+
it('should detect negative value for SliceTiming', function(){
29+
var jsonObj = '{"SliceTiming": [-1.0, 0.0, 1.0]}';
30+
validate.JSON(file, jsonObj, function (issues) {
31+
assert(issues.length === 1 && issues[0].code == 55);
32+
});
33+
});
2734
});

validators/schemas/bold.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"SliceTiming": {
2424
"type": "array",
2525
"items": {
26-
"type": "number"
26+
"type": "number",
27+
"minimum": 0
2728
}
2829
},
2930
"TaskName": {

0 commit comments

Comments
 (0)