Browse Source

move files to src folder

pull/1/head
Tim Glasgow 2 years ago
parent
commit
23b27ebbdc
  1. 2
      squarenotsquare/Launcher.js
  2. 3
      squarenotsquare/__mock__/mockDB.js
  3. 6
      squarenotsquare/__mock__/mockRealmObject.js
  4. 12
      squarenotsquare/__tests__/App-test.js
  5. 6
      squarenotsquare/__tests__/Migration-test.js
  6. 16
      squarenotsquare/__tests__/Redux-test.js
  7. 4
      squarenotsquare/index.js
  8. 12
      squarenotsquare/jest.config.js
  9. 0
      squarenotsquare/src/libs/Random.js
  10. 0
      squarenotsquare/src/navigation/SquareNav.js
  11. 0
      squarenotsquare/src/navigation/SquareStack.js
  12. 0
      squarenotsquare/src/realm/dbAPI.js
  13. 0
      squarenotsquare/src/realm/dbInit.js
  14. 0
      squarenotsquare/src/realm/entities/Score.js
  15. 0
      squarenotsquare/src/realm/entities/System.js
  16. 0
      squarenotsquare/src/realm/entities/User.js
  17. 0
      squarenotsquare/src/realm/migrations/MigrateV0.js
  18. 0
      squarenotsquare/src/realm/migrations/MigrateV1.js
  19. 0
      squarenotsquare/src/realm/repos/ScoreRepo.js
  20. 0
      squarenotsquare/src/realm/repos/SystemRepo.js
  21. 0
      squarenotsquare/src/realm/repos/UserRepo.js
  22. 0
      squarenotsquare/src/redux/CreateStore.js
  23. 0
      squarenotsquare/src/redux/actions/SystemActions.js
  24. 0
      squarenotsquare/src/redux/actions/UserActions.js
  25. 0
      squarenotsquare/src/redux/reducers/NavReducer.js
  26. 0
      squarenotsquare/src/redux/reducers/RootReducer.js
  27. 0
      squarenotsquare/src/redux/reducers/SystemReducer.js
  28. 0
      squarenotsquare/src/redux/reducers/UserReducer.js
  29. 0
      squarenotsquare/src/redux/types/SystemTypes.js
  30. 0
      squarenotsquare/src/screens/Game.js
  31. 0
      squarenotsquare/src/screens/HighScore.js
  32. 0
      squarenotsquare/src/screens/Home.js
  33. 0
      squarenotsquare/src/screens/Settings.js
  34. 0
      squarenotsquare/src/screens/Splash.js
  35. 0
      squarenotsquare/src/screens/styles/AppStyles.js
  36. 0
      squarenotsquare/src/services/Keystore.js
  37. 0
      squarenotsquare/src/themes/Colors.js
  38. 0
      squarenotsquare/src/themes/Fonts.js
  39. 0
      squarenotsquare/src/themes/Icons.js
  40. 0
      squarenotsquare/src/themes/Metrics.js

2
squarenotsquare/Launcher.js

@ -1,6 +1,6 @@
import React from 'react';
import {Provider} from 'react-redux';
import SquareStack from './navigation/SquareStack';
import SquareStack from './src/navigation/SquareStack';
function SquareNotSquare(props){
return (

3
squarenotsquare/__mock__/mockDB.js

@ -0,0 +1,3 @@
export async function initDB() {
return null;
}

6
squarenotsquare/__mock__/mockRealmObject.js

@ -1,6 +1,6 @@
import { Score } from "../realm/entities/Score";
import { System } from "../realm/entities/System";
import { User } from "../realm/entities/User";
import { Score } from "../src/realm/entities/Score";
import { System } from "../src/realm/entities/System";
import { User } from "../src/realm/entities/User";
export class MockRealm{

12
squarenotsquare/__tests__/App-test.js

@ -7,12 +7,12 @@ import React from 'react';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
import SquareStack from '../navigation/SquareStack';
import Game from '../screens/Game';
import HighScore from '../screens/HighScore';
import Home from '../screens/Home';
import Settings from '../screens/Settings';
import Splash from '../screens/Splash';
import SquareStack from '../src/navigation/SquareStack';
import Game from '../src/screens/Game';
import HighScore from '../src/screens/HighScore';
import Home from '../src/screens/Home';
import Settings from '../src/screens/Settings';
import Splash from '../src/screens/Splash';
it('renders square stack', () => {
renderer.create(<SquareStack />);

6
squarenotsquare/__tests__/Migration-test.js

@ -1,6 +1,6 @@
import { System } from "../realm/entities/System";
import { migratev0 } from "../realm/migrations/MigrateV0";
import { migratev1 } from "../realm/migrations/MigrateV1";
import { System } from "../src/realm/entities/System";
import { migratev0 } from "../src/realm/migrations/MigrateV0";
import { migratev1 } from "../src/realm/migrations/MigrateV1";
import { MockRealm } from "../__mock__/mockRealmObject";
test('Realm migrates to V0', () => {

16
squarenotsquare/__tests__/Redux-test.js

@ -0,0 +1,16 @@
import 'react-native';
import React from 'react';
import initStore from '../src/redux/CreateStore';
import appInit from '../src/redux/actions/SystemActions';
import { APP_INIT } from '../src/edux/types/SystemTypes';
const flushPromises = () => new Promise(setImmediate);
test('starts redux store', () => {
const reduxStore = initStore();
reduxStore.dispatch(appInit())
.then(() => {
const actualActions = reduxStore.getActions().map(action = action.type);
expect(actualActions).to.eql(APP_INIT);
});
});

4
squarenotsquare/index.js

@ -2,8 +2,8 @@ import React from 'react';
import {AppRegistry} from 'react-native';
import {name as appName} from './app.json';
import SquareNotSquare from './Launcher';
import configStore from './redux/CreateStore';
import { appInit } from './redux/actions/SystemActions';
import configStore from './src/redux/CreateStore';
import { appInit } from './src/redux/actions/SystemActions';
const squareStore = configStore;
squareStore.dispatch(appInit());

12
squarenotsquare/jest.config.js

@ -2,16 +2,14 @@ module.exports = {
// setupFiles: ['./jestSetup.js'],
preset: 'react-native',
verbose: true,
setupFiles: ["./node_modules/react-native-gesture-handler/jestSetup.js"],
moduleDirectories: ['node_modules'],
setupFiles: ['./node_modules/react-native-gesture-handler/jestSetup.js'],
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
// '@react-native-firebase/messaging: '<rootDir>/__mock__/mockFirebase.js',
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mock__/file.js"
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mock__/file.js'
},
/*
transform: {
'^.+\\(ts|tsx)?$': 'ts-jest',
'^.+\\(js|jsx)?$': 'babel-jest',
'^.+\\.(ts|tsx)?$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest',
}
*/
}

0
squarenotsquare/libs/Random.js → squarenotsquare/src/libs/Random.js

0
squarenotsquare/navigation/SquareNav.js → squarenotsquare/src/navigation/SquareNav.js

0
squarenotsquare/navigation/SquareStack.js → squarenotsquare/src/navigation/SquareStack.js

0
squarenotsquare/realm/dbAPI.js → squarenotsquare/src/realm/dbAPI.js

0
squarenotsquare/realm/dbInit.js → squarenotsquare/src/realm/dbInit.js

0
squarenotsquare/realm/entities/Score.js → squarenotsquare/src/realm/entities/Score.js

0
squarenotsquare/realm/entities/System.js → squarenotsquare/src/realm/entities/System.js

0
squarenotsquare/realm/entities/User.js → squarenotsquare/src/realm/entities/User.js

0
squarenotsquare/realm/migrations/MigrateV0.js → squarenotsquare/src/realm/migrations/MigrateV0.js

0
squarenotsquare/realm/migrations/MigrateV1.js → squarenotsquare/src/realm/migrations/MigrateV1.js

0
squarenotsquare/realm/repos/ScoreRepo.js → squarenotsquare/src/realm/repos/ScoreRepo.js

0
squarenotsquare/realm/repos/SystemRepo.js → squarenotsquare/src/realm/repos/SystemRepo.js

0
squarenotsquare/realm/repos/UserRepo.js → squarenotsquare/src/realm/repos/UserRepo.js

0
squarenotsquare/redux/CreateStore.js → squarenotsquare/src/redux/CreateStore.js

0
squarenotsquare/redux/actions/SystemActions.js → squarenotsquare/src/redux/actions/SystemActions.js

0
squarenotsquare/redux/actions/UserActions.js → squarenotsquare/src/redux/actions/UserActions.js

0
squarenotsquare/redux/reducers/NavReducer.js → squarenotsquare/src/redux/reducers/NavReducer.js

0
squarenotsquare/redux/reducers/RootReducer.js → squarenotsquare/src/redux/reducers/RootReducer.js

0
squarenotsquare/redux/reducers/SystemReducer.js → squarenotsquare/src/redux/reducers/SystemReducer.js

0
squarenotsquare/redux/reducers/UserReducer.js → squarenotsquare/src/redux/reducers/UserReducer.js

0
squarenotsquare/redux/types/SystemTypes.js → squarenotsquare/src/redux/types/SystemTypes.js

0
squarenotsquare/screens/Game.js → squarenotsquare/src/screens/Game.js

0
squarenotsquare/screens/HighScore.js → squarenotsquare/src/screens/HighScore.js

0
squarenotsquare/screens/Home.js → squarenotsquare/src/screens/Home.js

0
squarenotsquare/screens/Settings.js → squarenotsquare/src/screens/Settings.js

0
squarenotsquare/screens/Splash.js → squarenotsquare/src/screens/Splash.js

0
squarenotsquare/screens/styles/AppStyles.js → squarenotsquare/src/screens/styles/AppStyles.js

0
squarenotsquare/services/Keystore.js → squarenotsquare/src/services/Keystore.js

0
squarenotsquare/themes/Colors.js → squarenotsquare/src/themes/Colors.js

0
squarenotsquare/themes/Fonts.js → squarenotsquare/src/themes/Fonts.js

0
squarenotsquare/themes/Icons.js → squarenotsquare/src/themes/Icons.js

0
squarenotsquare/themes/Metrics.js → squarenotsquare/src/themes/Metrics.js

Loading…
Cancel
Save