Skip to content

Commit

Permalink
Fix window.crypto.subtle.digest in firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyi-gao-ttd committed Sep 22, 2023
1 parent 083c446 commit 879b401
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/spec/modules/uid2IdSystem_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe(`UID2 module`, function () {
// I've confirmed it's available in Firefox since v34 (it seems to be unavailable on BrowserStack in Firefox v106).
if (typeof window.crypto.subtle === 'undefined') {
restoreSubtleToUndefined = true;
window.crypto.subtle = { importKey: () => {}, decrypt: () => {}, deriveKey: () => {}, encrypt: () => {}, generateKey: () => {}, exportKey: () => {} };
window.crypto.subtle = { importKey: () => {}, digest: () => {}, decrypt: () => {}, deriveKey: () => {}, encrypt: () => {}, generateKey: () => {}, exportKey: () => {} };
}
suiteSandbox.stub(window.crypto.subtle, 'importKey').callsFake(() => Promise.resolve());
suiteSandbox.stub(window.crypto.subtle, 'digest').callsFake(() => Promise.resolve('hashed_value'));
Expand Down

0 comments on commit 879b401

Please sign in to comment.