@tramvai/test-mocks 2.145.1 → 2.146.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/context.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { STORE_TOKEN, ACTION_EXECUTION_TOKEN, ACTION_CONDITIONALS, EXECUTION_CONTEXT_MANAGER_TOKEN, CONTEXT_TOKEN } from '@tramvai/tokens-common';
1
+ import { STORE_TOKEN, ACTION_EXECUTION_TOKEN, ACTION_CONDITIONALS, EXECUTION_CONTEXT_MANAGER_TOKEN, DEFERRED_ACTIONS_MAP_TOKEN, CONTEXT_TOKEN } from '@tramvai/tokens-common';
2
2
  import { alwaysCondition, onlyServer, onlyBrowser, pageServer, pageBrowser, ExecutionContextManager, ActionExecution, createConsumerContext } from '@tramvai/module-common';
3
3
  import { PubSub } from '@tinkoff/pubsub';
4
4
  import { DI_TOKEN } from '@tinkoff/dippy';
@@ -35,6 +35,10 @@ const createMockContext = ({ stores, initialState, store = createMockStore({ sto
35
35
  provide: EXECUTION_CONTEXT_MANAGER_TOKEN,
36
36
  useClass: ExecutionContextManager,
37
37
  });
38
+ di.register({
39
+ provide: DEFERRED_ACTIONS_MAP_TOKEN,
40
+ useFactory: () => new Map(),
41
+ });
38
42
  di.register({
39
43
  provide: ACTION_EXECUTION_TOKEN,
40
44
  useClass: ActionExecution,
@@ -48,6 +52,7 @@ const createMockContext = ({ stores, initialState, store = createMockStore({ sto
48
52
  optional: true,
49
53
  },
50
54
  executionContextManager: EXECUTION_CONTEXT_MANAGER_TOKEN,
55
+ deferredActionsMap: DEFERRED_ACTIONS_MAP_TOKEN,
51
56
  },
52
57
  });
53
58
  }
package/lib/context.js CHANGED
@@ -39,6 +39,10 @@ const createMockContext = ({ stores, initialState, store: store$1 = store.create
39
39
  provide: tokensCommon.EXECUTION_CONTEXT_MANAGER_TOKEN,
40
40
  useClass: moduleCommon.ExecutionContextManager,
41
41
  });
42
+ di$1.register({
43
+ provide: tokensCommon.DEFERRED_ACTIONS_MAP_TOKEN,
44
+ useFactory: () => new Map(),
45
+ });
42
46
  di$1.register({
43
47
  provide: tokensCommon.ACTION_EXECUTION_TOKEN,
44
48
  useClass: moduleCommon.ActionExecution,
@@ -52,6 +56,7 @@ const createMockContext = ({ stores, initialState, store: store$1 = store.create
52
56
  optional: true,
53
57
  },
54
58
  executionContextManager: tokensCommon.EXECUTION_CONTEXT_MANAGER_TOKEN,
59
+ deferredActionsMap: tokensCommon.DEFERRED_ACTIONS_MAP_TOKEN,
55
60
  },
56
61
  });
57
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/test-mocks",
3
- "version": "2.145.1",
3
+ "version": "2.146.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -17,14 +17,14 @@
17
17
  "watch": "tsc -w"
18
18
  },
19
19
  "dependencies": {
20
- "@tramvai/core": "2.145.1",
20
+ "@tramvai/core": "2.146.0",
21
21
  "@tinkoff/pubsub": "0.5.7",
22
22
  "@tinkoff/router": "0.2.17",
23
23
  "@tinkoff/url": "0.8.6",
24
- "@tramvai/module-cookie": "2.145.1",
25
- "@tramvai/module-common": "2.145.1",
26
- "@tramvai/state": "2.145.1",
27
- "@tramvai/tokens-common": "2.145.1"
24
+ "@tramvai/module-cookie": "2.146.0",
25
+ "@tramvai/module-common": "2.146.0",
26
+ "@tramvai/state": "2.146.0",
27
+ "@tramvai/tokens-common": "2.146.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@tinkoff/dippy": "0.8.15",