From ddcb93da0c766c1dacd36910f201c67de244c533 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Wed, 18 Sep 2024 14:28:56 +0900 Subject: [PATCH] accepts options --- src/index.ts | 2 +- test/integrity-metadata/constructor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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", );