Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
10
Design System com StencilJs - 17 de fev. de 2020
joohncruz
0
13
Introducao React Apps
joohncruz
0
10
Engatinhando_com_Redux_Saga.pdf
joohncruz
0
18
Arquitetura React Projeto Base
joohncruz
0
56
Testes Unitários em React
joohncruz
0
58
Apresentando o VueJs
joohncruz
0
12
Testes Unitários em App React
joohncruz
0
16
Other Decks in Programming
See All in Programming
まだ間に合う!Claude Code元年をふりかえる
nogu66
3
480
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
260
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.3k
チームをチームにするEM
hitode909
0
290
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
Integrating WordPress and Symfony
alexandresalome
0
150
CSC305 Lecture 17
javiergs
PRO
0
340
Cell-Based Architecture
larchanjo
0
100
dotfiles 式年遷宮 令和最新版
masawada
1
740
AWS CDKの推しポイントN選
akihisaikeda
1
240
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
140
20 years of Symfony, what's next?
fabpot
2
350
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
57k
Navigating Team Friction
lara
191
16k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Designing for Performance
lara
610
69k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Become a Pro
speakerdeck
PRO
31
5.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
A better future with KSS
kneath
240
18k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
What's in a price? How to price your products and services
michaelherold
246
12k
Balancing Empowerment & Direction
lara
5
790
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!