File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -219,25 +219,6 @@ function createMockEnv() {
219
219
} ;
220
220
}
221
221
222
- // Mock for crypto.subtle.digest to ensure consistent token IDs in tests
223
- vi . spyOn ( crypto . subtle , 'digest' ) . mockImplementation ( async ( algorithm , data ) => {
224
- // For testing, we'll just return a predictable hash based on data length
225
- // This is not cryptographically secure, but works for tests
226
- const array = new Uint8Array ( 32 ) ; // SHA-256 produces 32 bytes
227
- const view = new DataView ( data ) ;
228
-
229
- // Fill array with a pattern based on input
230
- for ( let i = 0 ; i < array . length ; i ++ ) {
231
- if ( i < view . byteLength ) {
232
- array [ i ] = view . getUint8 ( i % view . byteLength ) ;
233
- } else {
234
- array [ i ] = i % 256 ;
235
- }
236
- }
237
-
238
- return array . buffer ;
239
- } ) ;
240
-
241
222
describe ( 'OAuthProvider' , ( ) => {
242
223
let oauthProvider : OAuthProvider ;
243
224
let mockEnv : ReturnType < typeof createMockEnv > ;
You can’t perform that action at this time.
0 commit comments