Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ecossistema de Testes com JavaScript
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jonathan Cruz Rocha Ferreira
May 09, 2019
Programming
0
71
Ecossistema de Testes com JavaScript
Ecossistema de Testes com JavaScript
Jonathan Cruz Rocha Ferreira
May 09, 2019
Tweet
Share
More Decks by Jonathan Cruz Rocha Ferreira
See All by Jonathan Cruz Rocha Ferreira
Automatizando Release
joohncruz
0
11
Design System com StencilJs - 17 de fev. de 2020
joohncruz
0
14
Introducao React Apps
joohncruz
0
10
Engatinhando_com_Redux_Saga.pdf
joohncruz
0
21
Arquitetura React Projeto Base
joohncruz
0
56
Testes Unitários em React
joohncruz
0
60
Apresentando o VueJs
joohncruz
0
14
Testes Unitários em App React
joohncruz
0
18
Other Decks in Programming
See All in Programming
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
270
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
Oxlintはいいぞ
yug1224
5
1.3k
SourceGeneratorのススメ
htkym
0
190
CSC307 Lecture 02
javiergs
PRO
1
780
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
AI時代の認知負荷との向き合い方
optfit
0
160
Oxlint JS plugins
kazupon
1
880
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
How to Talk to Developers About Accessibility
jct
2
130
We Are The Robots
honzajavorek
0
160
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
80
AI: The stuff that nobody shows you
jnunemaker
PRO
2
250
Side Projects
sachag
455
43k
Visualization
eitanlees
150
17k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
Building an army of robots
kneath
306
46k
Documentation Writing (for coders)
carmenintech
77
5.2k
Transcript
Ecossistema de Testes com JavaScript Jonathan Cruz Github: joohncruz Artur
Quirino Github ArturQuirino
“Por que não devemos testar nossa aplicação?” https://www.quora.com/Would-you-work-for-a-company-who-doesnt-write-tests/answer/Tim-Moore-2? srid=OBCN
Testes Automatizados Mike Cohn https://www.mountaingoatsoftware.com/blog/the-forgotten-layer-of-the-test-automation-pyramid
None
Tipos de testes https://willianjusten.com.br/entendendo-testes-de-software/ • Teste de Unidade • Teste
de Integração/Service • Teste de UI/e2e • etc
Testes Unitários O teste unitário tem por objetivo testar a
menor parte testável do sistema (unidade), em geral, um método. Idealmente, o teste unitário é independente de outros testes, validando assim cada parte ou funcionalidade individualmente.
Respondendo algumas perguntas O que eu estou testando? O que
o método deveria fazer? Qual o seu atual retorno? O que eu espero que retorne?
None
Ferramentas existem poucas MochaJS Jasmine Jest Cucumber Chai Unexpected Karma
Ava Sinon Enzyme Testdouble Istanbul Blanket Protractor PhantomJS Casper Nightwatch Cypress.io
Estrutura de testes Mocha, Jasmine, Jest e Cucumber // 1
- beforeAll // 1 - beforeEach // 1 - test // 1 - afterEach // 2 - beforeAll // 1 - beforeEach // 2 - beforeEach // 2 - test // 2 - afterEach // 1 - afterEach // 2 - afterAll // 1 - afterAll
Funções de Validação, asserts Chai, Jasmine, Jest e Unexpected .toBeNull()
.toBeTruthy() .toBeUndefined() .toContain(item) .toEqual(value) .toHaveLength(int) .toBe() https://jestjs.io/docs/en/expect.html
Display e Watch dos resultados Mocha, Jasmine, Jest e Karma
Snapshot Jest, Ava
Mocks, Spies e Stubs Sinon, Jasmine, enzyme, jest e testdouble
https://medium.com/@rickhanlonii/understanding-jest-mocks-f0046c68e53c
Cobertura de código Istanbul, Jest e Blanket https://jestjs.io/docs/en/configuration
Cobertura de código - reports Istanbul, Jest e Blanket https://jestjs.io/docs/en/configuration
None
“Jest apareceu 5x em 6” sim eu contei https://jestjs.io/ FACEBOOK
Navegador ou Ambiente Protractor, webdriver, nightwatch, phantom e casper https://frontendmasters.com/books/front-e
nd-handbook/2019/
Cypress.io https://www.cypress.io/features/
Cypress.io https://github.com/joohncruz/todo-list-rea ct-cypress
VALEU!