You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So that we can switch from browser-modules to SystemJS we will need a MockableSystemJS library that allows modules to be replaced for the duration of a test.
The text was updated successfully, but these errors were encountered:
It's worth pointing out that we may never use any of this infrastructure (MockableSystemJS, MockableSystemJS Wrapper Library or sub-realms compatibility layer) for any of the BRJS or CT libraries given that we plan to move those to NPM within the same time frame, given that browserify and webpack are more mature module systems than systemjsify.
This is especially the case since we don't yet know whether the proposed mocking system would work when used with the version of SystemJS that works natively on Node.js — this would be required so we could run our tests on both Node.Js and the browser, and may well cause additional work for us that we can otherwise avoid.
These are the mocking options if we are going to use a different module system:
Since we like to run our tests on both Node.js and the browser, proxyquire and rewire would appear to be the best options for us.
OTOH, libraries that need to require non JavaScript resources (e.g. HTML templates or CSS) won't be able to use browserify because it doesn't support non JavaScript assets, and won't be able to use webpack, since its plugin require syntax is incompatible with SystemJS.
Such libraries could run their tests using systemjsify on the browser alone, or might be able to run in Node.Js if it just happens to work anyway.
So that we can switch from browser-modules to SystemJS we will need a MockableSystemJS library that allows modules to be replaced for the duration of a test.
The text was updated successfully, but these errors were encountered: