@tramvai/test-child-app 1.65.1 → 1.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createTestApp, testApp } from '@tramvai/test-unit';
2
2
  import { provide } from '@tramvai/core';
3
- import { CHILD_APP_RESOLVE_BASE_URL_TOKEN, CHILD_APP_RESOLUTION_CONFIGS_TOKEN, CHILD_APP_LOADER_TOKEN, CHILD_APP_RESOLVE_CONFIG_TOKEN, CHILD_APP_DI_MANAGER_TOKEN, CHILD_APP_INTERNAL_RENDER_TOKEN } from '@tramvai/child-app-core';
3
+ import { CHILD_APP_RESOLVE_BASE_URL_TOKEN, CHILD_APP_RESOLUTION_CONFIGS_TOKEN, CHILD_APP_LOADER_TOKEN, CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN, CHILD_APP_RESOLVE_CONFIG_TOKEN, CHILD_APP_DI_MANAGER_TOKEN, CHILD_APP_INTERNAL_RENDER_TOKEN } from '@tramvai/child-app-core';
4
4
  import { ChildAppModule } from '@tramvai/module-child-app';
5
5
 
6
6
  // mock module federation internal stuff
@@ -23,6 +23,7 @@ const testChildApp = async (childApp, options = {}) => {
23
23
  }),
24
24
  provide({
25
25
  provide: CHILD_APP_RESOLUTION_CONFIGS_TOKEN,
26
+ multi: true,
26
27
  useValue: [
27
28
  {
28
29
  name: childApp.name,
@@ -53,6 +54,7 @@ This test wrapper supports only child-app with name "${childApp.name}"`);
53
54
  });
54
55
  const testAppWrapper = await testApp(testAppInstance.app);
55
56
  const appDi = testAppWrapper.app.di;
57
+ await appDi.get(CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN).init();
56
58
  const resolveExternalConfig = appDi.get(CHILD_APP_RESOLVE_CONFIG_TOKEN);
57
59
  const diManager = appDi.get(CHILD_APP_DI_MANAGER_TOKEN);
58
60
  const di = diManager.getChildDi(resolveExternalConfig({ name: childApp.name }));
package/lib/index.js CHANGED
@@ -27,6 +27,7 @@ const testChildApp = async (childApp, options = {}) => {
27
27
  }),
28
28
  core.provide({
29
29
  provide: childAppCore.CHILD_APP_RESOLUTION_CONFIGS_TOKEN,
30
+ multi: true,
30
31
  useValue: [
31
32
  {
32
33
  name: childApp.name,
@@ -57,6 +58,7 @@ This test wrapper supports only child-app with name "${childApp.name}"`);
57
58
  });
58
59
  const testAppWrapper = await testUnit.testApp(testAppInstance.app);
59
60
  const appDi = testAppWrapper.app.di;
61
+ await appDi.get(childAppCore.CHILD_APP_RESOLUTION_CONFIG_MANAGER_TOKEN).init();
60
62
  const resolveExternalConfig = appDi.get(childAppCore.CHILD_APP_RESOLVE_CONFIG_TOKEN);
61
63
  const diManager = appDi.get(childAppCore.CHILD_APP_DI_MANAGER_TOKEN);
62
64
  const di = diManager.getChildDi(resolveExternalConfig({ name: childApp.name }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/test-child-app",
3
- "version": "1.65.1",
3
+ "version": "1.66.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -18,17 +18,17 @@
18
18
  "build-for-publish": "true"
19
19
  },
20
20
  "dependencies": {
21
- "@tramvai/child-app-core": "1.65.1",
22
- "@tramvai/core": "1.65.1",
23
- "@tramvai/test-unit": "1.65.1",
21
+ "@tramvai/child-app-core": "1.66.0",
22
+ "@tramvai/core": "1.66.0",
23
+ "@tramvai/test-unit": "1.66.0",
24
24
  "tslib": "^2.0.3"
25
25
  },
26
26
  "devDependencies": {
27
- "@tramvai/react": "1.65.1",
27
+ "@tramvai/react": "1.66.0",
28
28
  "react": "^17.0.2"
29
29
  },
30
30
  "peerDependencies": {
31
- "@tramvai/module-child-app": "1.65.1"
31
+ "@tramvai/module-child-app": "1.66.0"
32
32
  },
33
33
  "license": "Apache-2.0",
34
34
  "module": "lib/index.es.js"