|
@@ -17,55 +17,25 @@ describe('Commands', () => {
|
17
|
17
|
it('sends startApp to native', () => {
|
18
|
18
|
uut.startApp({
|
19
|
19
|
container: {
|
20
|
|
- key: 'example.MyContainer'
|
|
20
|
+ key: 'com.example.MyScreen'
|
21
|
21
|
}
|
22
|
22
|
});
|
23
|
23
|
expect(mockNativeNavigation.startApp).toHaveBeenCalledTimes(1);
|
24
|
24
|
});
|
25
|
25
|
|
26
|
|
- it('parses the params and construct single screen hirarchy', () => {
|
|
26
|
+ it('adds uniqueId to passed container', () => {
|
27
|
27
|
mockUniqueIdProvider.uniqueId = jest.fn((prefix) => `${prefix}123`);
|
28
|
|
-
|
29
|
|
- expect(uut.parse(
|
30
|
|
- {
|
31
|
|
- container: {
|
32
|
|
- key: 'com.example.MyScreen'
|
33
|
|
- }
|
34
|
|
- })).toEqual(
|
35
|
|
- {
|
36
|
|
- containerStack: {
|
37
|
|
- id: 'containerStack123',
|
38
|
|
- stack: [
|
39
|
|
- {
|
40
|
|
- container: {
|
41
|
|
- key: 'com.example.MyScreen',
|
42
|
|
- id: 'container123'
|
43
|
|
- }
|
44
|
|
- }
|
45
|
|
- ]
|
46
|
|
- }
|
47
|
|
- });
|
|
28
|
+ uut.startApp({
|
|
29
|
+ container: {
|
|
30
|
+ key: 'com.example.MyScreen'
|
|
31
|
+ }
|
|
32
|
+ });
|
|
33
|
+ expect(mockNativeNavigation.startApp).toHaveBeenCalledWith({
|
|
34
|
+ container: {
|
|
35
|
+ key: 'com.example.MyScreen',
|
|
36
|
+ id: 'container123'
|
|
37
|
+ }
|
|
38
|
+ });
|
48
|
39
|
});
|
49
|
|
-
|
50
|
|
-
|
51
|
|
-
|
52
|
|
-
|
53
|
|
-
|
54
|
|
-
|
55
|
|
-
|
56
|
|
-
|
57
|
|
-
|
58
|
|
-
|
59
|
|
-
|
60
|
|
-
|
61
|
|
-
|
62
|
|
-
|
63
|
|
-
|
64
|
|
-
|
65
|
|
-
|
66
|
|
-
|
67
|
|
-
|
68
|
|
-
|
69
|
|
-
|
70
|
40
|
});
|
71
|
41
|
});
|