Comparing version 0.29.1 to 0.29.2
{ | ||
"name": "dcmjs", | ||
"version": "0.29.1", | ||
"version": "0.29.2", | ||
"description": "Javascript implementation of DICOM manipulation", | ||
@@ -5,0 +5,0 @@ "main": "build/dcmjs.js", |
@@ -768,1 +768,26 @@ import "regenerator-runtime/runtime.js"; | ||
}); | ||
it("Tests that reading fails on a DICOM without a meta length tag", () => { | ||
const rawFile = fs.readFileSync("test/no-meta-length-test.dcm"); | ||
let arrayBuffer = rawFile.buffer; | ||
if ( | ||
rawFile.byteOffset !== 0 || | ||
rawFile.byteLength !== arrayBuffer.byteLength | ||
) { | ||
arrayBuffer = arrayBuffer.slice( | ||
rawFile.byteOffset, | ||
rawFile.byteOffset + rawFile.byteLength | ||
); | ||
} | ||
expect(() => { | ||
dcmjs.data.DicomMessage.readFile(arrayBuffer, { | ||
ignoreErrors: false, | ||
untilTag: "0020000E", | ||
includeUntilTagValue: true | ||
}); | ||
}).toThrow( | ||
"Invalid DICOM file, meta length tag is malformed or not present." | ||
); | ||
}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11825154
54826