Browse Source

update to RN44

Daniel Zlotin 7 years ago
parent
commit
d97bdce3f1
4 changed files with 624 additions and 591 deletions
  1. 1
    1
      integration/remx/remx.test.js
  2. 4
    1
      lib/src/containers/ContainerWrapper.test.js
  3. 13
    13
      package.json
  4. 606
    576
      yarn.lock

+ 1
- 1
integration/remx/remx.test.js View File

42
 
42
 
43
     store.setters.setAge(30);
43
     store.setters.setAge(30);
44
     expect(store.getters.getAge()).toEqual(30);
44
     expect(store.getters.getAge()).toEqual(30);
45
-    expect(tree.toJSON().children).toEqual([30]);
45
+    expect(tree.toJSON().children).toEqual(['30']);
46
 
46
 
47
     expect(renderCountIncrement).toHaveBeenCalledTimes(2);
47
     expect(renderCountIncrement).toHaveBeenCalledTimes(2);
48
   });
48
   });

+ 4
- 1
lib/src/containers/ContainerWrapper.test.js View File

45
 
45
 
46
   it('must have id as prop', () => {
46
   it('must have id as prop', () => {
47
     const NavigationContainer = ContainerWrapper.wrap(containerName, MyContainer, store);
47
     const NavigationContainer = ContainerWrapper.wrap(containerName, MyContainer, store);
48
+    const orig = console.error; //eslint-disable-line
49
+    console.error = (a) => a; //eslint-disable-line
48
     expect(() => {
50
     expect(() => {
49
       renderer.create(<NavigationContainer />);
51
       renderer.create(<NavigationContainer />);
50
     }).toThrow(new Error('Container example.MyContainer does not have an id!'));
52
     }).toThrow(new Error('Container example.MyContainer does not have an id!'));
53
+    console.error = orig; //eslint-disable-line
51
   });
54
   });
52
 
55
 
53
   it('wraps the container', () => {
56
   it('wraps the container', () => {
102
     const NavigationContainer = ContainerWrapper.wrap(containerName, MyContainer, store);
105
     const NavigationContainer = ContainerWrapper.wrap(containerName, MyContainer, store);
103
     renderer.create(<NavigationContainer id={'container1'} />);
106
     renderer.create(<NavigationContainer id={'container1'} />);
104
     expect(myContainerRef.props.id).toEqual('container1');
107
     expect(myContainerRef.props.id).toEqual('container1');
105
-    expect(myContainerRef._reactInternalInstance._currentElement.key).toEqual('container1');
108
+    expect(myContainerRef._reactInternalInstance.key).toEqual('container1');
106
   });
109
   });
107
 
110
 
108
   it('saves self ref into store', () => {
111
   it('saves self ref into store', () => {

+ 13
- 13
package.json View File

41
     "release": "node ./scripts/release.js"
41
     "release": "node ./scripts/release.js"
42
   },
42
   },
43
   "peerDependencies": {
43
   "peerDependencies": {
44
-    "react-native": "*",
45
-    "react": "*"
44
+    "react": "*",
45
+    "react-native": "*"
46
   },
46
   },
47
   "dependencies": {
47
   "dependencies": {
48
     "lodash": "4.x.x"
48
     "lodash": "4.x.x"
49
   },
49
   },
50
   "devDependencies": {
50
   "devDependencies": {
51
-    "react-native": "0.41.2",
52
-    "react": "15.4.2",
53
-    "react-test-renderer": "15.4.2",
54
     "babel-cli": "6.x.x",
51
     "babel-cli": "6.x.x",
55
     "babel-core": "6.x.x",
52
     "babel-core": "6.x.x",
56
-    "babel-polyfill": "6.x.x",
57
     "babel-eslint": "7.x.x",
53
     "babel-eslint": "7.x.x",
54
+    "babel-jest": "20.x.x",
55
+    "babel-polyfill": "6.x.x",
58
     "babel-preset-react-native": "1.x.x",
56
     "babel-preset-react-native": "1.x.x",
59
     "babel-register": "6.x.x",
57
     "babel-register": "6.x.x",
60
-    "babel-jest": "18.x.x",
58
+    "detox": "5.x.x",
61
     "eslint": "3.x.x",
59
     "eslint": "3.x.x",
62
     "eslint-plugin-babel": "4.x.x",
60
     "eslint-plugin-babel": "4.x.x",
63
-    "eslint-plugin-react": "6.x.x",
61
+    "eslint-plugin-react": "7.x.x",
64
     "eslint-plugin-react-native": "2.x.x",
62
     "eslint-plugin-react-native": "2.x.x",
65
-    "jest": "18.x.x",
66
-    "jest-cli": "18.x.x",
63
+    "jest": "20.x.x",
64
+    "jest-cli": "20.x.x",
65
+    "mocha": "3.x.x",
66
+    "react": "16.0.0-alpha.6",
67
+    "react-native": "0.44.0",
68
+    "react-test-renderer": "16.0.0-alpha.6",
67
     "remx": "1.x.x",
69
     "remx": "1.x.x",
68
     "semver": "5.x.x",
70
     "semver": "5.x.x",
69
-    "detox": "5.x.x",
70
-    "mocha": "3.x.x",
71
     "shell-utils": "1.x.x"
71
     "shell-utils": "1.x.x"
72
   },
72
   },
73
   "babel": {
73
   "babel": {
82
   },
82
   },
83
   "jest": {
83
   "jest": {
84
     "preset": "react-native",
84
     "preset": "react-native",
85
-    "testPathDirs": [
85
+    "roots": [
86
       "<rootDir>/node_modules/",
86
       "<rootDir>/node_modules/",
87
       "<rootDir>/lib/src/",
87
       "<rootDir>/lib/src/",
88
       "<rootDir>/integration/"
88
       "<rootDir>/integration/"

+ 606
- 576
yarn.lock
File diff suppressed because it is too large
View File