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
20
Arquitetura React Projeto Base
joohncruz
0
56
Testes Unitários em React
joohncruz
0
60
Apresentando o VueJs
joohncruz
0
13
Testes Unitários em App React
joohncruz
0
18
Other Decks in Programming
See All in Programming
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.8k
AI & Enginnering
codelynx
0
110
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
AI巻き込み型コードレビューのススメ
nealle
1
150
MUSUBIXとは
nahisaho
0
130
CSC307 Lecture 07
javiergs
PRO
0
550
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
AI時代の認知負荷との向き合い方
optfit
0
150
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
CSC307 Lecture 04
javiergs
PRO
0
660
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
66k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
250
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
110
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
84
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
The Spectacular Lies of Maps
axbom
PRO
1
520
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!