We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c96ef7 commit a69f1ecCopy full SHA for a69f1ec
1 file changed
src/app/service/service_worker/utils.test.ts
@@ -63,10 +63,10 @@ describe.concurrent("parseUrlSRI", () => {
63
expect(result.hash).toBeUndefined();
64
});
65
it.concurrent("不规则的SRI", () => {
66
- const url = "https://example.com/script.js#sha256";
+ const url = "https://example.com/script.js#sha256"; // 格式错误不视为哈希值
67
const result = parseUrlSRI(url);
68
expect(result.url).toEqual("https://example.com/script.js");
69
- expect(result.hash).toEqual({});
+ expect(result.hash).toBeUndefined();
70
const url2 = "https://example.com/script.js#sha256=abc123==,md5";
71
const result2 = parseUrlSRI(url2);
72
expect(result2.url).toEqual("https://example.com/script.js");
0 commit comments