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
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
61
Apresentando o VueJs
joohncruz
0
14
Testes Unitários em App React
joohncruz
0
18
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
MUSUBIXとは
nahisaho
0
130
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
110
Patterns of Patterns
denyspoltorak
0
1.4k
ThorVG Viewer In VS Code
nors
0
770
CSC307 Lecture 02
javiergs
PRO
1
780
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
CSC307 Lecture 05
javiergs
PRO
0
500
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
51
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
90
Ethics towards AI in product and experience design
skipperchong
2
190
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Rails Girls Zürich Keynote
gr2m
96
14k
The agentic SEO stack - context over prompts
schlessera
0
630
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
Everyday Curiosity
cassininazir
0
130
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
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!