Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 7108c12

Browse files
committed
Fix Jest tests and default for TComb
1 parent 69234d4 commit 7108c12

7 files changed

Lines changed: 1094 additions & 6668 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Please refer to [https://github.com/bartonhammond/snowflake-hapi-openshift](http
7878
------------
7979
##Notes
8080

81-
Code is written to [JS Standard](https://github.com/feross/standard). See [Text Editor Plugins](https://github.com/feross/standard#text-editor-plugins) for your favorite editor integration.
81+
Code is written to [JS Standard](https://github.com/feross/standard) and validated with [Eslint](http://eslint.org/). To setup your favorite editor using the Eslint configuration, see [Editors](http://eslint.org/docs/user-guide/integrations#editors)
8282

8383
Navigation is handled with [React Native Router Flux](https://github.com/aksonov/react-native-router-flux). Multiple scenes support **Login, Register, and Reset Password**. Once successfully logged in, there are 3 more scenes: **Logout, Subview, and Profile**.
8484

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "snowflake",
3-
"version": "0.1.11",
3+
"version": "0.1.12",
44
"private": true,
55
"jest": {
66
"preset": "jest-react-native",
77
"moduleNameMapper": {
8-
"\\./datepicker$": "<rootDir>/node_modules/tcomb-form-native/lib/templates/bootstrap/datepicker.ios.js"
8+
"\\./datepicker$": "<rootDir>/node_modules/tcomb-form-native/lib/templates/bootstrap/datepicker.ios.js",
9+
"\\./select$": "<rootDir>/node_modules/tcomb-form-native/lib/templates/bootstrap/select.ios.js"
910
},
1011
"preprocessorIgnorePatterns": [
1112
"node_modules/(?!react-native|tcomb-form-native|apsl-react-native-button)"
@@ -14,8 +15,9 @@
1415
"verbose": true
1516
},
1617
"scripts": {
17-
"lint": "eslint . --fix --ignore-path .gitignore --format=node_modules/eslint-formatter-pretty",
18-
"test": "npm run lint && jest",
18+
"lint": "eslint . --fix --ignore-path .gitignore --format=node_modules/eslint-formatter-pretty",
19+
"lint-validate": "eslint . --ignore-path .gitignore --quiet",
20+
"test": "npm run lint-validate && jest -u",
1921
"start": "react-native start",
2022
"test:watch": "npm run test -- --watch",
2123
"test-chrome": "node-debug --preload false --nodejs --harmony jest --runInBand",

src/components/__tests__/__snapshots__/FormButton-test.js.snap

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ exports[`test FormButton 1`] = `
33
style={
44
Object {
55
"marginLeft": 10,
6-
"marginRight": 10
6+
"marginRight": 10,
77
}
88
}>
99
<View
@@ -13,12 +13,12 @@ exports[`test FormButton 1`] = `
1313
accessible={true}
1414
hitSlop={undefined}
1515
onLayout={undefined}
16-
onResponderGrant={[Function bound touchableHandleResponderGrant]}
17-
onResponderMove={[Function bound touchableHandleResponderMove]}
18-
onResponderRelease={[Function bound touchableHandleResponderRelease]}
19-
onResponderTerminate={[Function bound touchableHandleResponderTerminate]}
20-
onResponderTerminationRequest={[Function bound touchableHandleResponderTerminationRequest]}
21-
onStartShouldSetResponder={[Function bound touchableHandleStartShouldSetResponder]}
16+
onResponderGrant={[Function]}
17+
onResponderMove={[Function]}
18+
onResponderRelease={[Function]}
19+
onResponderTerminate={[Function]}
20+
onResponderTerminationRequest={[Function]}
21+
onStartShouldSetResponder={[Function]}
2222
style={
2323
Object {
2424
"alignSelf": "stretch",
@@ -30,21 +30,23 @@ exports[`test FormButton 1`] = `
3030
"height": 44,
3131
"justifyContent": "center",
3232
"marginBottom": 10,
33-
"opacity": 1
33+
"opacity": 1,
3434
}
3535
}
3636
testID={undefined}>
3737
<Text
38-
allowFontScaling={undefined}
38+
accessible={true}
39+
allowFontScaling={true}
40+
ellipsizeMode="tail"
3941
style={
4042
Array [
4143
Object {
4244
"alignSelf": "center",
43-
"fontSize": 18
45+
"fontSize": 18,
4446
},
4547
Object {
46-
"fontSize": 18
47-
}
48+
"fontSize": 18,
49+
},
4850
]
4951
}>
5052
TestString

src/components/__tests__/__snapshots__/Header-test.js.snap

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports[`Header should be display empty text when not fetching 1`] = `
66
"alignItems": "center",
77
"backgroundColor": "transparent",
88
"justifyContent": "center",
9-
"marginTop": 20
9+
"marginTop": 20,
1010
}
1111
}>
1212
<View
@@ -16,18 +16,18 @@ exports[`Header should be display empty text when not fetching 1`] = `
1616
accessible={true}
1717
hitSlop={undefined}
1818
onLayout={undefined}
19-
onResponderGrant={[Function bound touchableHandleResponderGrant]}
20-
onResponderMove={[Function bound touchableHandleResponderMove]}
21-
onResponderRelease={[Function bound touchableHandleResponderRelease]}
22-
onResponderTerminate={[Function bound touchableHandleResponderTerminate]}
23-
onResponderTerminationRequest={[Function bound touchableHandleResponderTerminationRequest]}
24-
onStartShouldSetResponder={[Function bound touchableHandleStartShouldSetResponder]}
19+
onResponderGrant={[Function]}
20+
onResponderMove={[Function]}
21+
onResponderRelease={[Function]}
22+
onResponderTerminate={[Function]}
23+
onResponderTerminationRequest={[Function]}
24+
onStartShouldSetResponder={[Function]}
2525
style={
2626
Array [
2727
Object {
28-
"backgroundColor": "transparent"
28+
"backgroundColor": "transparent",
2929
},
30-
undefined
30+
undefined,
3131
]
3232
}
3333
testID={undefined}>
@@ -36,7 +36,7 @@ exports[`Header should be display empty text when not fetching 1`] = `
3636
style={
3737
Object {
3838
"height": 100,
39-
"width": 100
39+
"width": 100,
4040
}
4141
} />
4242
</View>
@@ -52,7 +52,7 @@ exports[`Header should be display spinner when fetching 1`] = `
5252
"alignItems": "center",
5353
"backgroundColor": "transparent",
5454
"justifyContent": "center",
55-
"marginTop": 20
55+
"marginTop": 20,
5656
}
5757
}>
5858
<View
@@ -62,18 +62,18 @@ exports[`Header should be display spinner when fetching 1`] = `
6262
accessible={true}
6363
hitSlop={undefined}
6464
onLayout={undefined}
65-
onResponderGrant={[Function bound touchableHandleResponderGrant]}
66-
onResponderMove={[Function bound touchableHandleResponderMove]}
67-
onResponderRelease={[Function bound touchableHandleResponderRelease]}
68-
onResponderTerminate={[Function bound touchableHandleResponderTerminate]}
69-
onResponderTerminationRequest={[Function bound touchableHandleResponderTerminationRequest]}
70-
onStartShouldSetResponder={[Function bound touchableHandleStartShouldSetResponder]}
65+
onResponderGrant={[Function]}
66+
onResponderMove={[Function]}
67+
onResponderRelease={[Function]}
68+
onResponderTerminate={[Function]}
69+
onResponderTerminationRequest={[Function]}
70+
onStartShouldSetResponder={[Function]}
7171
style={
7272
Array [
7373
Object {
74-
"backgroundColor": "transparent"
74+
"backgroundColor": "transparent",
7575
},
76-
undefined
76+
undefined,
7777
]
7878
}
7979
testID={undefined}>
@@ -82,7 +82,7 @@ exports[`Header should be display spinner when fetching 1`] = `
8282
style={
8383
Object {
8484
"height": 100,
85-
"width": 100
85+
"width": 100,
8686
}
8787
} />
8888
</View>

0 commit comments

Comments
 (0)