ruleeeer commented on pull request #1473:
URL: https://github.com/apache/avro/pull/1473#issuecomment-1022800836


    @martin-g 
   Could you help me? I have a problem with test case.
   When I use test frameworks (such as Mocha headless chrome or mochify) to 
build tests, they all use 'browserify' to bundle the test code (because Avro 
uses require), but if 'browserify' finds that `require ('buffer ')` is used 
during bundling, it will automatically mount the `Buffer` to the global 
attribute, as shown in the figure below. You can find this part of the document 
here https://github.com/browserify/browserify#compatibility
   <img width="856" alt="image" 
src="https://user-images.githubusercontent.com/70385062/151283397-a017e84f-4918-437c-b442-3f0270d44cce.png";>
   
   This means that if we use the "browserify" test library to bundle code, we 
will never find the problem of "Buffer is not defined". However, Avro browser 
uses require, we must rely on bundling to convert it into a syntax recognized 
by the browser. In this way, how should we build test cases? (I can't imagine 
how to do this without webpack or rollup)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to