Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ルーム内でのカード操作,テストの実装とデプロイ用の設定(v0.0.3) #34

Merged
merged 164 commits into from
May 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
f644d7b
add react-native-elements and socket-io-client
YasuakiYoshii Oct 16, 2020
029db4d
add socket and modify room list
YasuakiYoshii Oct 16, 2020
97b13a3
change project name
YasuakiYoshii Oct 16, 2020
5838f48
commentout socket and implement search list
YasuakiYoshii Oct 16, 2020
56fa67f
add env
YasuakiYoshii Oct 18, 2020
2a608b5
add create and enter and list room with graphql
YasuakiYoshii Nov 15, 2020
0c86033
Merge branch 'develop' into feature/room_list
YasuakiYoshii Nov 29, 2020
2e0b35f
add mutation
YasuakiYoshii Dec 13, 2020
621ceca
add custom fetch to apollo client
bana118 Dec 27, 2020
3cebe9b
modify endpoint
YasuakiYoshii Dec 27, 2020
457183c
add text input for preferences
bana118 Dec 27, 2020
3424ae7
set endpoint with preference instead of env file
bana118 Dec 27, 2020
a4b5f11
remove socket.io and subscriptions packages
YasuakiYoshii Dec 27, 2020
3b34eb4
Merge branch 'develop' into feature/room_list
YasuakiYoshii Dec 27, 2020
8a0214d
add websocket
YasuakiYoshii Dec 27, 2020
d532eb8
delete unnecessary comment
bana118 Dec 28, 2020
ba65477
delete unnecessary comment
bana118 Dec 28, 2020
76269ef
Merge pull request #13 from 2d-rpg/feature/room_list
YasuakiYoshii Dec 28, 2020
61764f2
merge develop
bana118 Dec 29, 2020
cce7ff6
modify pan type
bana118 Dec 29, 2020
c27a773
use ip address of preferences when websocket connectting
bana118 Dec 29, 2020
f8b4453
supress eslint warning
bana118 Dec 29, 2020
ea871a8
remove comment
bana118 Dec 29, 2020
3c58066
use 127.0.0.1 as default in websocket
bana118 Dec 29, 2020
dfe9e01
modify codeql ci to oficial recommended
bana118 Dec 29, 2020
dac716f
remove PR from codeql ci
bana118 Dec 29, 2020
18c2057
modify webscoket condition and comment out nonused args
YasuakiYoshii Dec 29, 2020
fb4138f
add on.pull_request on codeql
YasuakiYoshii Dec 29, 2020
0f87452
remove on.push on codeql
YasuakiYoshii Dec 29, 2020
a5437c1
modify if sentense at websocket endpoint setting
bana118 Dec 29, 2020
90c8797
add push event to codeql ci
bana118 Dec 29, 2020
7e84616
Merge pull request #14 from 2d-rpg/feature/preferences
bana118 Dec 29, 2020
9aa9e8f
move @types/node to devdependencies
bana118 Jan 3, 2021
569fedc
move @types/react-native-dialog to devdependencies
bana118 Jan 3, 2021
62f1a7d
move @types/yup to devdependencies
bana118 Jan 3, 2021
17608f5
update expo
bana118 Jan 3, 2021
5433d24
install latest react-native-elements
bana118 Jan 3, 2021
5a69447
add themeproveide and test
bana118 Jan 3, 2021
099d4c7
remove unused
YasuakiYoshii Jan 3, 2021
737c379
Merge pull request #17 from 2d-rpg/feature/modify_style
bana118 Jan 3, 2021
fe53e7f
hide back button
bana118 Jan 4, 2021
c5a57bb
add bottom tab menu
bana118 Jan 4, 2021
103aa07
use home screen as setting screen
bana118 Jan 4, 2021
954d181
add fabIcon for createRoom
bana118 Jan 4, 2021
735e1f7
add icon for tab
bana118 Jan 4, 2021
c9d6c28
add refetch for tab switching
bana118 Jan 4, 2021
cc43aef
save local deck when swip up and swipe down instead of select deck
bana118 Jan 5, 2021
431ffc8
remove unused import
bana118 Jan 5, 2021
a6a2c74
add comment about filter[0]
bana118 Jan 5, 2021
caa17fa
add activity indicator for loading
bana118 Jan 5, 2021
14c1158
use new picker for expo sdk 40
bana118 Jan 5, 2021
736dcba
contain image in component and set image height and width reference t…
bana118 Jan 5, 2021
850daf1
modify equation
bana118 Jan 5, 2021
ae9ab17
remove logger
bana118 Jan 5, 2021
9946401
add flat list hight style
bana118 Jan 7, 2021
29e60b7
use react-native-floating-action
bana118 Jan 7, 2021
078a9af
use floating action button
bana118 Jan 7, 2021
98ca33f
add delete confirm dialog
bana118 Jan 7, 2021
79f2331
modify flatList style
bana118 Jan 7, 2021
120470e
add todo comment
bana118 Jan 7, 2021
2ccaf93
remove todo comment
bana118 Jan 7, 2021
98026cd
Merge pull request #19 from 2d-rpg/feature/modify_theme
bana118 Jan 8, 2021
ee1da23
add websocket
YasuakiYoshii Jan 10, 2021
cb8b98e
change to websocket
YasuakiYoshii Jan 10, 2021
375a19e
add navigate from createroom to room
YasuakiYoshii Jan 10, 2021
cf59977
fix first unable to send websocket
YasuakiYoshii Jan 10, 2021
5de9490
sync position with already enetred one
YasuakiYoshii Jan 10, 2021
e291130
remove scrollview
bana118 Jan 11, 2021
739a979
send pan position only if websocket state is open
bana118 Jan 11, 2021
aebd254
remove unused scrollview import
bana118 Jan 11, 2021
82a6f73
remove resutl val of roomList
bana118 Jan 11, 2021
7720623
[isLoading,setLoading]->[isLoading,setIsLoading]
bana118 Jan 11, 2021
72becec
not repeat default endpoint
bana118 Jan 11, 2021
097eedc
show error if roomname already exist
YasuakiYoshii Jan 13, 2021
77306a1
add num
YasuakiYoshii Jan 13, 2021
201da9e
add update button
YasuakiYoshii Jan 13, 2021
63a6e5f
able to search with id
YasuakiYoshii Jan 14, 2021
57b8737
fix var name
YasuakiYoshii Jan 24, 2021
3fc8a9a
fix roomid from number to string (uuid)
YasuakiYoshii Jan 24, 2021
5f78f23
remove exist
YasuakiYoshii Jan 24, 2021
82229c7
add refreshcontrol
YasuakiYoshii Jan 24, 2021
c9b20ab
remove unused package
YasuakiYoshii Jan 24, 2021
eceee41
Merge pull request #21 from 2d-rpg/feature/change_to_websocket
YasuakiYoshii Jan 24, 2021
68cfa1a
suppress cache conflict error
bana118 Jan 24, 2021
2ba40c3
replace filter()[0] -> find()
bana118 Jan 24, 2021
5ecc378
show not_found.png when failing to load server card
bana118 Jan 24, 2021
f85d578
show warn coment when failing to load image
bana118 Jan 24, 2021
235ad5c
add .expo-shared/* to .gitignore
bana118 Jan 24, 2021
9516f5f
include .expo-shared. it needs to be shared
bana118 Jan 24, 2021
e3ad509
share card position from each deck
YasuakiYoshii Jan 24, 2021
523e0c1
Merge pull request #23 from 2d-rpg/feature/card_loading_error
bana118 Jan 25, 2021
f9756a6
add movable card
YasuakiYoshii Jan 31, 2021
92270c6
remove unused import
bana118 Feb 5, 2021
0ff52fa
fix sort function
bana118 Feb 5, 2021
3f4ca72
add comment
YasuakiYoshii Feb 7, 2021
41faf5f
remove polling
YasuakiYoshii Feb 7, 2021
84da28a
Merge pull request #24 from 2d-rpg/feature/movable_card
YasuakiYoshii Feb 7, 2021
77d37c4
update node
bana118 Feb 7, 2021
4d409b5
add try-catch to async storage getItem function
bana118 Feb 7, 2021
d8e375c
refactor init websocket
bana118 Feb 7, 2021
32f50c8
refactor refresh room list
bana118 Feb 7, 2021
1f4241f
modify comment
bana118 Feb 7, 2021
1a70ffc
refactor create room.create room when pressing confirm button
bana118 Feb 7, 2021
d42e3aa
add ws message types
bana118 Feb 28, 2021
3429365
rename ws-message directory
bana118 Feb 28, 2021
66b4311
fix typo
bana118 Feb 28, 2021
3ed2ec4
add todo comment
bana118 Feb 28, 2021
052ad0d
Merge pull request #25 from 2d-rpg/feature/movable_deck
bana118 Feb 28, 2021
fc97923
use useRef in websocket onmessage
bana118 Mar 7, 2021
a561683
unuse export default
bana118 Mar 7, 2021
85b5335
move deckPicker to components dir
bana118 Mar 7, 2021
b530810
move enterRoomConfirmDialog to components dir and modify DeckPicker c…
bana118 Mar 7, 2021
a81f4ff
modify movableCard component
bana118 Mar 7, 2021
0e5e3fd
move ServerCard interface to utils dir
bana118 Mar 7, 2021
6fb0057
add setPosition in movable card
bana118 Mar 7, 2021
b62f434
add useState for card property(e.g. position)
bana118 Mar 7, 2021
d14a380
add todo comment
bana118 Mar 7, 2021
4c784ab
load all cards in deck when enter room
bana118 Mar 14, 2021
455b1ec
render some cards in room
bana118 Mar 14, 2021
28fbc70
overlab own cards in room
bana118 Mar 21, 2021
7268dc3
add tap event to card
bana118 Mar 21, 2021
2807b40
add pan and tap event handler
bana118 Mar 21, 2021
b3b998f
fix panGestureHandler
bana118 Mar 21, 2021
ac21de4
add release event handler to card
bana118 Mar 21, 2021
65d0e4f
set opponent cards
bana118 Apr 4, 2021
6cce147
send card index to server
bana118 Apr 4, 2021
e5683fd
add empty item to deck picker
bana118 Apr 4, 2021
598f026
modify card info type sending to server
bana118 Apr 6, 2021
8e91482
sync cards inconpletely
bana118 Apr 11, 2021
f994667
remove unused function
bana118 Apr 18, 2021
007e5e5
create new room tsx
bana118 Apr 18, 2021
50f67c0
impl seaquence for only 1 client
bana118 Apr 18, 2021
e0b7463
impl card send to another client at first and change card position to…
bana118 Apr 18, 2021
a39b66b
fix received card position type
bana118 Apr 18, 2021
b2f4d67
remove initx, inity
bana118 Apr 18, 2021
4e4c7bc
rename cardsInfo -> firstCardsInfo
bana118 Apr 18, 2021
5f6565c
rename /cards -> /first-cards
bana118 Apr 18, 2021
662d1e1
add isCardsInfoMessage type
bana118 Apr 18, 2021
ce93e7e
send card info when moving card, but cannot sync offset position of card
bana118 Apr 19, 2021
e5ac380
remove offset paramater
bana118 Apr 19, 2021
78c98f4
modify animatedValueToNumber function
bana118 Apr 19, 2021
a819442
remove unused import
bana118 Apr 19, 2021
a43c52c
remove tmp file
bana118 Apr 19, 2021
f6002b9
remove comment
bana118 Apr 19, 2021
6ec0d4a
change nodejs version to 14.x from 12.x in github action
bana118 Apr 19, 2021
25ccb67
add todo comments
bana118 Apr 19, 2021
73bf294
mix own cards and opponent cards to one array
bana118 Apr 25, 2021
427339a
cooment out
bana118 Apr 25, 2021
12ddc1f
Merge pull request #27 from 2d-rpg/feature/movable_deck
bana118 Apr 25, 2021
b2cb0c8
setup test for Card and MovableCard
YasuakiYoshii May 2, 2021
0468d37
change test library to @testing-library/react-native
YasuakiYoshii May 9, 2021
1d953db
Add test step to expo workflow
YasuakiYoshii May 16, 2021
05b2659
Modify snapshots
YasuakiYoshii May 16, 2021
213b61b
Merge pull request #28 from 2d-rpg/feature/testing
YasuakiYoshii May 16, 2021
ac4f0e8
modify app.json
bana118 May 16, 2021
f3dfe41
Merge branch 'develop' into feature/deploy_setting
bana118 May 16, 2021
93e0eae
add java install command to devcontainer
bana118 May 16, 2021
0a72595
add version code for android
bana118 May 16, 2021
7f5e2c3
remove java install from devcontainer
bana118 May 16, 2021
1927d99
change icom
bana118 May 23, 2021
6f49874
change android permission
bana118 May 23, 2021
7461d67
update version and remove log and comment
bana118 May 30, 2021
a9675d2
change app name in app.json
bana118 May 30, 2021
5d0f04a
Merge pull request #33 from 2d-rpg/feature/deploy_setting
bana118 May 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:12.18.4-slim
FROM node:14.17.0-buster-slim

RUN apt update \
&& apt install -y --no-install-recommends \
apt-utils \
git \
ca-certificates \
procps \
&& npm install expo-cli --global \
&& npm install --global expo-cli \
&& apt autoremove -y \
&& apt clean -y \
&& rm -rf /var/lib/apt/lists/* \
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "card-game-simulator",
"name": "card-playroom-client",
"dockerFile": "Dockerfile",
"forwardPorts": [19000, 19001, 19002, 19006],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"#terminal.integrated.defaultProfile.linux#": "/bin/bash"
},
"extensions": [
"dbaeumer.vscode-eslint",
"rvest.vs-code-prettier-eslint",
"esbenp.prettier-vscode",
"hookyqr.beautify",
"msjsdiag.vscode-react-native",
"dsznajder.es7-react-js-snippets",
"dsznajder.es7-react-js-snippets"
]
}
}
2 changes: 0 additions & 2 deletions .env.example

This file was deleted.

45 changes: 25 additions & 20 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"env": {
"node": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {}
}
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"env": {
"node": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {},
"settings": {
"react": {
"version": "detect"
}
}
}
15 changes: 3 additions & 12 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
name: "CodeQL"

on:
# push:
# branches: [main, develop]
push:
pull_request:
# The branches below must be a subset of the branches above
# branches: [main, develop]
types: [opened, synchronize]
# schedule:
# - cron: "0 4 * * 4" # every Thursday 4am
schedule:
- cron: "30 1 * * 0"

jobs:
analyze:
Expand All @@ -36,11 +32,6 @@ jobs:
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/expo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: NodeJS
on: pull_request

jobs:
build:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: "12.x"
node-version: "14.x"
- name: Cache node modules
uses: actions/cache@v2
env:
Expand All @@ -26,3 +26,5 @@ jobs:
run: yarn install --frozen-lockfile
- name: Lint
run: npm run lint
- name: Test
run: yarn test
13 changes: 13 additions & 0 deletions App.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from "react";
import { render } from "@testing-library/react-native";

import App from "./App";

jest.useFakeTimers();

describe("<App />", () => {
it("has 1 child", () => {
const tree = render(<App />).toJSON();
expect(tree?.children.length).toBe(1);
});
});
130 changes: 115 additions & 15 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,63 @@
import React, { ReactElement } from "react";
import { NavigationContainer } from "@react-navigation/native";
import {
getFocusedRouteNameFromRoute,
NavigationContainer,
ParamListBase,
RouteProp,
} from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import HomeScreen from "./src/screens/home/index";
import RoomScreen from "./src/screens/room/index";
import CreateRoomScreen from "./src/screens/create-room/index";
import RoomListScreen from "./src/screens/room-list/index";
import EditDeckScreen from "./src/screens/edit-deck/index";
import PreferencesScreen from "./src/screens/preferences/index";
import { ENDPOINT } from "@env";
import { ApolloClient, InMemoryCache, ApolloProvider } from "@apollo/client";
import {
ApolloClient,
InMemoryCache,
ApolloProvider,
HttpLink,
} from "@apollo/client";
import "reflect-metadata";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { Icon } from "react-native-elements";

const cache = new InMemoryCache();

// TODO uriを設定画面から変更できるようにする
const customFetch = async (uri: string, options: RequestInit) => {
try {
const endpoint = await AsyncStorage.getItem("@endpoint");
if (endpoint == null) {
return fetch(`http://127.0.0.1${uri}`, options);
} else {
return fetch(`http://${endpoint}${uri}`, options);
}
} catch (error) {
// 設定読み込みエラー
console.log(error);
return fetch(`http://127.0.0.1${uri}`, options);
}
};
const client = new ApolloClient({
cache: cache,
uri: `http://${ENDPOINT}/graphql`,
// defaultOptions: { watchQuery: { fetchPolicy: "cache-and-network" } },
cache: new InMemoryCache({
// サーバー側のデータが消去されていてキャッシュとコンフリクトした時の警告を表示しない
typePolicies: {
Query: {
fields: {
cards: {
merge(_existing, incoming) {
return incoming;
},
},
decksWithCards: {
merge(_existing, incoming) {
return incoming;
},
},
},
},
},
}),
link: new HttpLink({ fetch: customFetch }),
uri: "/graphql",
});

export default function App(): ReactElement {
Expand All @@ -28,13 +69,45 @@ export default function App(): ReactElement {
screenOptions={{
headerStyle: { backgroundColor: "#706fd3" },
headerTintColor: "white",
headerLeft: () => null,
}}
>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen
// TODO 名前変更
name="Home"
options={({ route }) => ({
headerTitle: getHeaderTitle(route),
})}
>
{() => (
<Tab.Navigator initialRouteName="Home">
<Tab.Screen
name="Home"
component={HomeScreen}
options={{
tabBarIcon: homeIcon,
}}
/>
<Tab.Screen
name="RoomList"
component={RoomListScreen}
options={{
tabBarIcon: roomListIcon,
}}
/>
<Tab.Screen
name="EditDeck"
component={EditDeckScreen}
options={{
tabBarIcon: editDeckIcon,
}}
/>
</Tab.Navigator>
)}
</Stack.Screen>

<Stack.Screen name="Room" component={RoomScreen} />
<Stack.Screen name="RoomList" component={RoomListScreen} />
<Stack.Screen name="EditDeck" component={EditDeckScreen} />
<Stack.Screen name="Preferences" component={PreferencesScreen} />
<Stack.Screen name="CreateRoom" component={CreateRoomScreen} />
</Stack.Navigator>
</NavigationContainer>
</ApolloProvider>
Expand All @@ -43,10 +116,37 @@ export default function App(): ReactElement {

export type RootStackParamList = {
Home: undefined;
Room: undefined;
Room: { roomid: string; endpoint: string; cardIds: number[] };
CreateRoom: { endpoint: string };
RoomList: undefined;
EditDeck: undefined;
Preferences: undefined;
};

const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
const getHeaderTitle = (route: RouteProp<ParamListBase, "Home">) => {
const routeName = getFocusedRouteNameFromRoute(route);
switch (routeName) {
case "RoomList":
return "RoomList";
case "EditDeck":
return "EditDeck";
default:
return routeName;
}
};

const homeIcon = ({ color, size }: { color: string; size: number }) => {
return <Icon name="home" color={color} size={size} />;
};

const roomListIcon = ({ color, size }: { color: string; size: number }) => {
return <Icon name="meeting-room" color={color} size={size} />;
};

const editDeckIcon = ({ color, size }: { color: string; size: number }) => {
return (
<Icon type="material-community" name="cards" color={color} size={size} />
);
};
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Card Game Simulator
# Card Playroom Client

![ReactNative](https://img.shields.io/static/v1?label=React%20Native&message=v0.63.2&color=61DAFB&logo=react)
![TypeScript](https://img.shields.io/static/v1?label=TypeScript&message=v3.9.5&color=007ACC&logo=typeScript)
![Docker](https://img.shields.io/static/v1?label=Docker&message=v19.3.13&color=2496ED&logo=docker)
![Node.js](https://img.shields.io/static/v1?label=Node.js&message=v12.18.4&color=339933&logo=node.js)

[![Release](https://img.shields.io/github/v/release/2d-rpg/card-game-simulator?include_prereleases)](https://github.com/2d-rpg/card-game-simulator/releases)
[![NodeJS](https://github.com/2d-rpg/card-game-simulator/workflows/NodeJS/badge.svg)](https://github.com/2d-rpg/card-game-simulator/actions?query=workflow%3ANodeJS)
[![CodeQL](https://github.com/2d-rpg/card-game-simulator/workflows/CodeQL/badge.svg)](https://github.com/2d-rpg/card-game-simulator/actions?query=workflow%3ACodeQL)
[![Release](https://img.shields.io/github/v/release/2d-rpg/card-playroom-client?include_prereleases)](https://github.com/2d-rpg/card-playroom-client/releases)
[![NodeJS](https://github.com/2d-rpg/card-playroom-client/workflows/NodeJS/badge.svg)](https://github.com/2d-rpg/card-playroom-client/actions?query=workflow%3ANodeJS)
[![CodeQL](https://github.com/2d-rpg/card-playroom-client/workflows/CodeQL/badge.svg)](https://github.com/2d-rpg/card-playroom-client/actions?query=workflow%3ACodeQL)

## <img src="https://user-images.githubusercontent.com/42469701/95276781-1b815500-0887-11eb-84e5-f1dc89df3efb.png" width="20px"> How to get started

VSCode の[Remote Container 拡張](https://code.visualstudio.com/docs/remote/containers)の使用を推奨します.
このプロジェクトをクローンし,VSCode の[Remote Container 拡張](https://code.visualstudio.com/docs/remote/containers)を使用して開く.

```
git clone https://github.com/2d-rpg/card-game-simulator.git
code card-game-simulator
git clone https://github.com/2d-rpg/card-playroom-client.git
code card-playroom-client
```

以下 Docker コンテナ上で実行
Expand Down
1 change: 1 addition & 0 deletions __mocks__/@react-native-async-storage/async-storage..js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "@react-native-async-storage/async-storage/jest/async-storage-mock";
1 change: 1 addition & 0 deletions __mocks__/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
According to (this link)[https://react-native-async-storage.github.io/async-storage/docs/advanced/jest/], this directory was creatred.
14 changes: 14 additions & 0 deletions __tests__/__snapshots__/components/Card.test.tsx.snap.android
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Card /> should match snapshot 1`] = `
<Image
resizeMode="contain"
source={1}
style={
Object {
"height": 36,
"width": 12,
}
}
/>
`;
14 changes: 14 additions & 0 deletions __tests__/__snapshots__/components/Card.test.tsx.snap.ios
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Card /> should match snapshot 1`] = `
<Image
resizeMode="contain"
source={1}
style={
Object {
"height": 36,
"width": 12,
}
}
/>
`;
Loading