Unit test fail: packages/server-renderer/__tests__/webStream.spec.ts
Version
3.2.4
Reproduction link
Steps to reproduce
- Clone the source code
- Use yarn to install dependencies
- Run
yarn test
What is expected?
All unit tests passed
What is actually happening?
Tests at packages/server-renderer/__tests__/webStream.spec.ts
wrong.
Error message: Cannot find module 'stream/web' from 'packages/server-renderer/tests/webStream.spec.ts'
Node version: v14.17.4 Yarn version: v1.22.11
I have checked the tsconfig.json
file, we do have dom
lib, so I have no idea about how to address this issue..
This issue is related to source code, so the reproduction link is just a initial page.
Thank you for any help or advises!
Upgrade the node version to v16.7.0, The test cases can be passed.
For details, see: https://nodejs.org/dist/latest-v16.x/docs/api/webstreams.html#webstreams_web_streams_api
Upgrade the node version to v16.7.0, The test cases can be passed.
For details, see: https://nodejs.org/dist/latest-v16.x/docs/api/webstreams.html#webstreams_web_streams_api
It works, Really thank you! I forgot to check the doc of node, maybe we can add a code comment here? :thinking: