Giter Site home page Giter Site logo

codeguyluke / reactnativecomponentstester Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 14.0 199 KB

Boilerplate of React Native project together with tests setup, perfect for basic components testing.

Python 14.18% Java 11.65% JavaScript 38.14% Objective-C 36.03%

reactnativecomponentstester's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reactnativecomponentstester's Issues

flow tests fail on awesome-button

If you attempt to run the flow tests on the awesome-button component, flow outputs the following errors:

$ flow
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/components/awesome-button/awesome-button.js:18:14

Cannot create TouchableHighlight element because inexact ____DangerouslyImpreciseStyle_Internal [1] is incompatible with
exact $ReadOnly [2] in property style.

     src/components/awesome-button/awesome-button.js
      13│
      14│ export default function AwesomeButton(props: Props) {
      15│   return (
      16│     <TouchableHighlight
      17│       onPress={props.onPress}
      18│       style={StyleSheet.flatten([style.container, props.style])}
      19│     >
      20│       <Text style={StyleSheet.flatten([style.text, props.textStyle])}>{props.children}</Text>
      21│     </TouchableHighlight>
      22│   );
      23│ }
      24│

     node_modules/react-native/Libraries/StyleSheet/StyleSheetTypes.js
 [2] 235│   $ReadOnly<$Shape<____ViewStyle_Internal>>,

     node_modules/react-native/Libraries/StyleSheet/flattenStyle.js
 [1]  19│ ): ?DangerouslyImpreciseStyle {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/components/awesome-button/awesome-button.js:18:51

Cannot call StyleSheet.flatten with array literal bound to style because:
 • in array element:
    • Either number [1] is not an object.
    • Or number [1] is incompatible with boolean literal false [2].
    • Or number [1] is incompatible with empty string [3].
 • in array element:
    • Either array type [4] is not an object.
    • Or number [5] is not an object in array element.
    • Or number [5] is incompatible with boolean literal false [2] in array element.
    • Or number [5] is incompatible with empty string [3] in array element.

           src/components/awesome-button/awesome-button.js
 [1][4][5]  10│   style?: number | Object | Array<number>,
              :
            15│   return (
            16│     <TouchableHighlight
            17│       onPress={props.onPress}
            18│       style={StyleSheet.flatten([style.container, props.style])}
            19│     >
            20│       <Text style={StyleSheet.flatten([style.text, props.textStyle])}>{props.children}</Text>
            21│     </TouchableHighlight>

           node_modules/react-native/Libraries/StyleSheet/StyleSheetTypes.js
       [2] 227│   | false
       [3] 228│   | ''


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/components/awesome-button/awesome-button.js:20:52

Cannot call StyleSheet.flatten with array literal bound to style because:
 • in array element:
    • Either number [1] is not an object.
    • Or number [1] is incompatible with boolean literal false [2].
    • Or number [1] is incompatible with empty string [3].
 • in array element:
    • Either array type [4] is not an object.
    • Or number [5] is not an object in array element.
    • Or number [5] is incompatible with boolean literal false [2] in array element.
    • Or number [5] is incompatible with empty string [3] in array element.

           src/components/awesome-button/awesome-button.js
 [1][4][5]  11│   textStyle?: number | Object | Array<number>,
              :
            17│       onPress={props.onPress}
            18│       style={StyleSheet.flatten([style.container, props.style])}
            19│     >
            20│       <Text style={StyleSheet.flatten([style.text, props.textStyle])}>{props.children}</Text>
            21│     </TouchableHighlight>
            22│   );
            23│ }

           node_modules/react-native/Libraries/StyleSheet/StyleSheetTypes.js
       [2] 227│   | false
       [3] 228│   | ''



Found 5 errors

Only showing the most relevant union/intersection branches.
To see all branches, re-run Flow with --show-all-branches
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.