diff --git a/test/unit/metadata_spec.js b/test/unit/metadata_spec.js
index 01a992702..2abadc139 100644
--- a/test/unit/metadata_spec.js
+++ b/test/unit/metadata_spec.js
@@ -128,6 +128,37 @@ describe('metadata', function() {
expect(isEmptyObj(metadata.getAll())).toEqual(true);
});
+ it('should gracefully handle "junk" before the actual metadata (issue 10395)',
+ function() {
+ const data = '' +
+ '' +
+ '' +
+ '' +
+ 'PDFKit.NET 4.0.102.0' +
+ '' +
+ '1.7' +
+ '' +
+ '2018-12-27T13:50:36-08:00' +
+ '2018-12-27T13:50:38-08:00' +
+ '' +
+ '2018-12-27T13:50:38-08:00' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ 'application/pdf' +
+ '';
+ const metadata = new Metadata(data);
+
+ expect(isEmptyObj(metadata.getAll())).toEqual(true);
+ });
+
it('should correctly handle metadata containing "&apos" (issue 10407)',
function() {
const data = '' +