File tree Expand file tree Collapse file tree 3 files changed +2
-12
lines changed Expand file tree Collapse file tree 3 files changed +2
-12
lines changed Original file line number Diff line number Diff line change 3333 "dependencies" : {
3434 "@babel/runtime-corejs3" : " 7.28.4" ,
3535 "react-native-crypto-js" : " 1.0.0" ,
36- "uuid" : " 13.0.0" ,
3736 "ws" : " 8.18.3"
3837 },
3938 "devDependencies" : {
136135 ".*" : " ./babel-jest.js"
137136 },
138137 "transformIgnorePatterns" : [
139- " /node_modules/(?!uuid)/" ,
140138 " package.json"
141139 ],
142140 "testEnvironment" : " jsdom"
Original file line number Diff line number Diff line change @@ -20,10 +20,6 @@ const mockWeChat = require('./test_helpers/mockWeChat');
2020
2121global . wx = mockWeChat ;
2222
23- jest . mock ( 'uuid' , ( ) => {
24- return ( ) => 0 ;
25- } ) ;
26-
2723describe ( 'WeChat' , ( ) => {
2824 beforeEach ( ( ) => {
2925 process . env . PARSE_BUILD = 'weapp' ;
Original file line number Diff line number Diff line change @@ -14,13 +14,9 @@ if (process.env.PARSE_BUILD === 'weapp') {
1414 s [ 8 ] = s [ 13 ] = s [ 18 ] = s [ 23 ] = '-' ;
1515 return s . join ( '' ) ;
1616 } ;
17- } else if ( process . env . PARSE_BUILD === 'node' || process . env . PARSE_BUILD === 'react-native' ) {
18- // Use Node.js built-in crypto.randomUUID() for Node and React Native builds
19- // React Native tests run in Node.js environment, and uuid v13 is ESM-only
20- uuid = require ( 'crypto' ) . randomUUID ;
2117} else {
22- // Use uuid package for browser builds
23- uuid = require ( 'uuid ' ) . v4 ;
18+ // Use crypto.randomUUID() for Node, React Native, and browser builds
19+ uuid = require ( 'crypto ' ) . randomUUID ;
2420}
2521
2622export default uuid ;
You can’t perform that action at this time.
0 commit comments