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

Challenge Finalizado - Arthur Dionízio #28

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['babel-preset-env', 'babel-preset-react', 'babel-preset-typescript']
}
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [Requisitos Obrigatórios](#requisitos-obrigatórios)
- [Bônus](#bônus)
- [Submissão e Prazo de Entrega](#submissão-e-prazo-de-entrega)
- [Como rodar o projeto](#como-rodar-o-projeto)

## Descrição

Expand Down Expand Up @@ -57,3 +58,28 @@ Quando o usuário clicar em "Adicionar", o formulário deverá ser resetado e o
- O prazo de entrega para este desafio é de 2 (duas) semanas, contando a partir do dia em que o candidato recebeu o email com o link do repositório;
- Ao finalizar o desafio, o candidato deverá submeter o desafio no questionário disponível na sua área de candidato na plataforma(https://menvievagas.com.br/vagas/fam%C3%8Dliapires/) do Processo Seletivo. É só clicar em RESPONDER no questionário e inserir o link do seu PR.
Em caso de dúvidas, enviar um e-mail para [email protected]

### Como rodar o projeto

Primeiramente para instalar as libs
```bash
npm install
# or
yarn
```
Para rodar o projeto
```bash
yarn start
```
Para rodar o json server local
```bash
json-server --watch db.json --port 8000
```
Se quiser adicionar delay nas requisições para deixa-las mais realistas
```bash
json-server --watch db.json --port 8000 --delay 500
```
Para rodar testes automatizados
```bash
yarn test
```
32 changes: 32 additions & 0 deletions db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"countries": [
{
"name": "Brasil",
"flag": "https://flagcdn.com/br.svg",
"local": "Rio de Janeiro",
"meta": "05/2022",
"id": 1
},
{
"name": "Estados Unidos",
"flag": "https://flagcdn.com/us.svg",
"local": "Nova York",
"meta": "12/2022",
"id": 2
},
{
"name": "Brasil",
"flag": "https://flagcdn.com/br.svg",
"local": "São Paulo",
"meta": "12/2023",
"id": 3
},
{
"name": "Chile",
"flag": "https://flagcdn.com/cl.svg",
"local": "Condilheira dos Andes",
"meta": "07/2022",
"id": 4
}
]
}
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exporpts = {
testPathIgnorePatterns: ["/node_modules/"],
setupFilesAfterEnv:[
"<rootDir>/src/tests/setupTests.ts"
],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest"
},
testEnviroment: 'jsdom'
};
Loading