-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Reading through the article and through this support thread, this module-federation example, and the tweets around Code Streaming, I'm a bit confused on how we can write an integration test with jest where the federated apps could be resolved from a module that is fetched from a server (hosted on S3) instead of require-ing from the hard drive.
@ScriptedAlchemy in regards to tests, is the idea to use something like fetch/axios to load the module and then add it to the require.cache?
webpack.test.config.js:
const reunited = (remotePath, name) => `promise new Promise(resolve => {
const fetch = require('node-fetch');
fetch('${remotePath}').then(response => response.text()).then(moduleCode => {
require.cache[name] = moduleCode;
resolve(moduleCode);
});
})`Metadata
Metadata
Assignees
Labels
No labels