Skip to content

Commit 88b1120

Browse files
committed
update nifti header test with indexing fix
1 parent 8d32b6c commit 88b1120

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/headerField.spec.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const assert = require('assert')
22
const headerFields = require('../validators/headerFields')
33

44
describe('headerFields', () => {
5-
it('should throw an error if _magnitude1 or _magnitude2 files do not have exactly dimensions.', () => {
5+
it('should throw an error if _magnitude1 or _magnitude2 files do not have exactly 3 dimensions.', () => {
66
const headers = [
77
// each of these headers has one too many dimensions on the 'dim' field.
88
[
@@ -69,9 +69,9 @@ describe('headerFields', () => {
6969
relativePath: 'sub-01_magnitude1.nii',
7070
},
7171
{
72-
dim: [4, 1, 1, 1],
73-
pixdim: [4, 1, 1, 1],
74-
xyzt_units: [4, 1, 1, 1],
72+
dim: [3, 1, 1, 1],
73+
pixdim: [3, 1, 1, 1],
74+
xyzt_units: [3, 1, 1, 1],
7575
},
7676
],
7777
[
@@ -80,9 +80,9 @@ describe('headerFields', () => {
8080
relativePath: 'sub-01_magnitude2.nii',
8181
},
8282
{
83-
dim: [4, 1, 1, 1],
84-
pixdim: [4, 1, 1, 1],
85-
xyzt_units: [4, 1, 1, 1],
83+
dim: [3, 1, 1, 1],
84+
pixdim: [3, 1, 1, 1],
85+
xyzt_units: [3, 1, 1, 1],
8686
},
8787
],
8888
]
@@ -131,8 +131,8 @@ describe('headerFields', () => {
131131
relativePath: 'sub-01_T1w.nii',
132132
},
133133
{
134-
dim: [4, 1, 1, 1],
135-
pixdim: [4, 1, 1, 1],
134+
dim: [3, 1, 1, 1],
135+
pixdim: [3, 1, 1, 1],
136136
xyzt_units: [4, 1, 1, 1],
137137
},
138138
],

0 commit comments

Comments
 (0)