This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js"></script> | |
| <!-- Load TensorFlow.js --> | |
| <script src="https://unpkg.com/@tensorflow/tfjs"></script> | |
| <!-- Load Posenet --> | |
| <script src="https://unpkg.com/@tensorflow-models/posenet"></script> | |
| <script src="sketch.js"></script> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {act, fireEvent, waitFor} from '@testing-library/react-native'; | |
| import {screenParameters} from '../extras/data'; | |
| import {renderWithNavigation} from '../extras/helpers'; | |
| import SecondaryScreen from '../../src/screens/SecondaryScreen'; | |
| import MainScreen from '../../src/screens/MainScreen'; | |
| describe('<SecondaryScreen />', () => { | |
| let wrapper; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const screenParameters = { | |
| paramOne: 'This is a parameter that is a text', | |
| paramTwo: { | |
| content: 'This is a parameter that is an object with a content', | |
| }, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {act, fireEvent, waitFor} from '@testing-library/react-native'; | |
| import {Alert} from 'react-native'; | |
| import AppStack from '../../src/navigators/AppStack'; | |
| import {renderWithNavigation} from '../extras/helpers'; | |
| describe('<MainScreen />', () => { | |
| let wrapper; | |
| beforeEach(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import {NavigationContainer} from '@react-navigation/native'; | |
| import {createStackNavigator} from '@react-navigation/stack'; | |
| import {render} from '@testing-library/react-native'; | |
| const Stack = createStackNavigator(); | |
| const renderOtherComponents = (otherComponents, screenConfig = {}) => { | |
| return otherComponents.map(({name, component}) => { | |
| return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| preset: 'react-native', | |
| modulePathIgnorePatterns: ['extras'], | |
| setupFiles: [ | |
| '<rootDir>/node_modules/react-native-gesture-handler/jestSetup.js', | |
| ], | |
| transformIgnorePatterns: [ | |
| 'node_modules/(?!(jest-)?react-native|react-(native|universal|navigation)-(.*)|@react-native-community/(.*)|@react-navigation/(.*)|bs-platform|@rootstrap/redux-tools)', | |
| ], | |
| verbose: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default { | |
| openPicker: jest.fn().mockImplementation(() => Promise.resolve(result)) | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default { | |
| openPicker: jest | |
| .fn(() => Promise.resolve(result)) // default implementation | |
| .mockImplementationOnce(() => Promise.reject(result)) // first time is called | |
| .mockImplementationOnce(() => Promise.resolve(result)), // second time is called | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default { | |
| API_URL: 'https://mock.com/api' | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {StyleSheet} from 'react-native'; | |
| const differentFont = "Dan'sDisneyUI"; | |
| const styles = StyleSheet.create({ | |
| container: { | |
| alignItems: 'center', | |
| flex: 1, | |
| justifyContent: 'space-around', | |
| }, |
NewerOlder