Skip to content
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
Binary file added estados-insta4/insta4/.DS_Store
Binary file not shown.
Binary file added estados-insta4/insta4/src/.DS_Store
Binary file not shown.
Binary file not shown.
27 changes: 27 additions & 0 deletions intro-testes/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "exercicios-testes-tarde",
"version": "1.0.0",
"description": "",
"keywords": [],
"main": "src/index.js",
"dependencies": {
"react": "16.8.6",
"react-dom": "16.8.6",
"react-scripts": "5.0.0"
},
"devDependencies": {
"typescript": "3.3.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
43 changes: 43 additions & 0 deletions intro-testes/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>

<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>

</html>
7 changes: 7 additions & 0 deletions intro-testes/src/exercicios/ex1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function checaBissexto(ano) {
if ((ano % 4 === 0 && ano % 100 !== 0) || ano % 400 === 0) {
return true;
} else {
return false;
}
}
62 changes: 62 additions & 0 deletions intro-testes/src/exercicios/ex1.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { checaBissexto } from "./ex1";

describe("Checa bissexto", () => {
test("retorna true pra 1600", () => {
const resultado = checaBissexto(1600);

expect(resultado).toEqual(true);
});



test("retorna true pra 2000", () => {
const resultado = checaBissexto(2000);

expect(resultado).toEqual(true);
});

test("retorna true pra 1996", () => {
const resultado = checaBissexto(1996);

expect(resultado).toEqual(true);
});

test("retorna true pra 2008", () => {
const resultado = checaBissexto(2008);

expect(resultado).toEqual(true);
});

test("retorna false pra 2007", () => {
const resultado = checaBissexto(2007);

expect(resultado).toEqual(true);
});

test("retorna false para 2023", ()=>{
const resultado = checaBissexto(2023);

expect(resultado).toEqual(true);
});


test("retorna false pra 1983", () => {
const resultado = checaBissexto(1983);

expect(resultado).toEqual(true);
});



test("retorna false pra 1983", () => {
const resultado = checaBissexto(1983);

expect(resultado).toEqual(true);
});

test("retorna true pra 2022", () => {
const resultado = checaBissexto(2022);

expect(resultado).toEqual(true);
});
});
9 changes: 9 additions & 0 deletions intro-testes/src/exercicios/ex2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export function checaPalindromo(frase) {
return (
frase ===
frase
.split("")
.reverse()
.join("")
);
}
24 changes: 24 additions & 0 deletions intro-testes/src/exercicios/ex2.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { checaPalindromo } from "./ex2";

describe("Checa Palíndromo", () => {
it("retorna true para 'mirim'", () => {
const ehPalindromo = checaPalindromo("mirim");
expect(ehPalindromo).toEqual(true);
});

it("retorna true para 'arara'", () => {
const ehPalindromo = checaPalindromo("arara");
expect(ehPalindromo).toEqual(true);
});

it("retorna true para 'asa'", () => {
const ehPalindromo = checaPalindromo("asa");
expect(ehPalindromo).toEqual(true);
});

it("retorna true para 'Socorram-me'", () => {
const ehPalindromo = checaPalindromo("em marrocos");
expect(ehPalindromo).toEqual(true);
});
//Apesar de aparentemente ficarem iguais existe o "-" em socorram-me
});
4 changes: 4 additions & 0 deletions intro-testes/src/exercicios/ex3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function checaItensDuplicados(array) {
const numerosDuplicados = array.filter((item, index) => array.indexOf(item) !== index)
return numerosDuplicados.length ? true : false
}
3 changes: 3 additions & 0 deletions intro-testes/src/exercicios/ex3.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { checaItensDuplicados } from "./ex3";

describe("Checa itens duplicados", () => {});
16 changes: 16 additions & 0 deletions intro-testes/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";
import ReactDOM from "react-dom";

import "./styles.css";

function App() {
return (
<div className="App">
<h1>Hello CodeSandbox</h1>
<h2>Start editing to see some magic happen!</h2>
</div>
);
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
4 changes: 4 additions & 0 deletions intro-testes/src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.App {
font-family: sans-serif;
text-align: center;
}
12 changes: 12 additions & 0 deletions lojaConsole/lojinaconsole.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loja Console</title>
</head>
<body>
<script type="text/javascript" src="lojinhaConsole.js"></script>
</body>
</html>
21 changes: 21 additions & 0 deletions lojaConsole/lojinhaConsole.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const alimentos = [
{Nome: 'Azeitona', Volume:'250g',Preço: 2.99,DataDeValidade:'22/10/2022',Quantidade:'25'},
{Nome: 'Feijão', Volume:'1k',Preço: 6.99,DataDeValidade:'03/11/2022',Quantidade:'50'},
{Nome: 'Arroz', Volume:'1k',Preço: 8.99,DataDeValidade:'07/0//2022',Quantidade:'60'}]


const brinquedos = [

{Nome:'Storm Shadow', Preço: 119.99, ClassificaçãoIndicativa:'12', Quantidade:'17'},
{Nome:'Snake Eyes', Preço: 119.99, ClassificaçãoIndicativa:'12', Quantidade:'13'},
{Nome:'baronesa', Preço: 119.99, ClassificaçãoIndicativa:'12', Quantidade:'8'}]

const mostraListBrinquedos = () =>{
console.log(`Catalógo de brinquedos ${brinquedos}`)


}

const mostraListAlimentos = () =>{
console.log(`Alimentos para sua refeição ${alimentos}`)
}
3 changes: 3 additions & 0 deletions postinhoRevisao/revisãoJs-postinho/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5502
}
15 changes: 15 additions & 0 deletions postinhoRevisao/revisãoJs-postinho/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="index.js" defer></script>
<title>Document</title>
</head>
<body>
<h1>Revisãoo Js - Postinho</h1>


</body>
</html>
Loading