itwinjs-core
itwinjs-core copied to clipboard
Aidantran/no render app fix
Created a test suite under full-stack-tests that tests the ability to establish an iModelConnection in Node outside of Certa. Emulates the structure and env file of ecschema-rpc-interface.
We still have to define fetch, Request, and xmlhttprequest globally. Fetch and Request are required by WebAppRpcRequest: https://github.com/iTwin/itwinjs-core/blob/86dad171da1e948fae45930586ecfe8824efce91/core/common/src/rpc/web/WebAppRpcRequest.ts#L258-L266 , and xmlhttprequest is required by i18next. (It could be possible in the future for i18next to rely on Fetch once this pr is merged: https://github.com/iTwin/itwinjs-core/pull/4052)
Fixes https://github.com/iTwin/itwinjs-backlog/issues/326
@pmconne I've added it as an integration step and it's passing, is that what you had in mind for the requested change?
@aruniverse what is the difference between NoRenderApp and MockRender.App ? Is there one that should be used rather than the other or are they unrelated/doing different things ?
what is the difference between NoRenderApp and MockRender.App
MockRender.App is for tests.
what is the difference between NoRenderApp and MockRender.App
MockRender.App is for tests.
I thought so was NoRenderApp, so I guess this is unrelated.
I thought so was NoRenderApp, so I guess this is unrelated
MockRender.App lets the test hook into and respond to calls into RenderSystem APIs. NoRenderApp simply avoids attempting to initialize WebGL and implements all RenderSystem APIs as no-ops.
This pull request is now in conflicts. Could you fix it @AidanTran? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/