diff --git a/src/index.ts b/src/index.ts index fc7f73f..3f5b411 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,7 +35,7 @@ export function getPrioritizedHashAlgorithm( } export const IntegrityMetadataRegex = - /^(?sha256|sha384|sha512)-(?(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?)(?:[?](?[\x21-\x7e]*))?$/; + /^(?sha256|sha384|sha512)-(?(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?)(?:[?](?[\x21-\x7e]*))?$/; export const SeparatorRegex = /[^\x21-\x7e]+/; diff --git a/test/integrity-metadata/constructor.js b/test/integrity-metadata/constructor.js index 89d7dd8..c6df9bc 100644 --- a/test/integrity-metadata/constructor.js +++ b/test/integrity-metadata/constructor.js @@ -38,7 +38,7 @@ test("supports SHA-512", function () { }); }); -test.todo("accepts options", function () { +test("accepts options", function () { const integrityMetadata = new IntegrityMetadata( "sha256-MV9b23bQeMQ7isAGTkoBZGErH853yGk0W/yUx1iU7dM=?foo?bar", );