Younes Jaaidi
@yjaaidi
Younes Jaaidi
@yjaaidi
Google Developer Expert
for Angular & Web Technologies
Younes Jaaidi
@yjaaidi
Google Developer Expert
for Angular & Web Technologies
📚 guide-angular.wishtack.io
Younes Jaaidi
@yjaaidi
Google Developer Expert
for Angular & Web Technologies
📚 guide-angular.wishtack.io
📺 marmicode.fr
Younes Jaaidi
@yjaaidi
Google Developer Expert
for Angular & Web Technologies
📚 guide-angular.wishtack.io
📺 marmicode.fr
Trainer, Tech Advisor & eXtreme Programming Coach
at {{yourCompany.name}}
Younes Jaaidi
@yjaaidi
Google Developer Expert
for Angular & Web Technologies
📚 guide-angular.wishtack.io
📺 marmicode.fr
ℹ️ wishtack.io
Trainer, Tech Advisor & eXtreme Programming Coach
at {{yourCompany.name}}
Younes Jaaidi
@yjaaidi
Google Developer Expert
for Angular & Web Technologies
📚 guide-angular.wishtack.io
📺 marmicode.fr
ℹ️ wishtack.io
Trainer, Tech Advisor & eXtreme Programming Coach
at {{yourCompany.name}}
FREE DIAGNOSTIC
Angular Component Unit-Testing Workshop
@yjaaidi
@yjaaidi
Do we really
need tests?
🥵
Stop testing
every change
manually
⚡️
Faster
development
🤖
Automated tests
💪
Confidence
✨
Quality
🐞
Less bugs
🛠
Refactoring
🐇
Faster time
to market
⚽️
Collective
ownership
♻️
Update
dependencies
automatically
(or frequently)
🥳
Pleasure
Not Visible
Visible
@yjaaidi
@yjaaidi
🚀 Up-to-date
@yjaaidi
🦋 Symmetric
you get the exact doc of the version you are using
🚀 Up-to-date
@yjaaidi
🌏 More surface
🦋 Symmetric
you get the exact doc of the version you are using
🚀 Up-to-date
@yjaaidi
🐇 Fast
🐻 Independent
🔁 Repeatable
🤖 Self-validating
⏰ Timely
@yjaaidi
ItemList
ItemPreview
<div> <item-preview>
Component { ... }
<div> <span>
Component { ... }
@yjaaidi
<div> <item-preview>
Component { ... }
<div> <span>
Component { ... }
"Integration"
TestBed.configureTestingModule({
imports: [ItemListModule]
});
ItemList
ItemPreview
@yjaaidi
<div> <item-preview>
Component { ... }
<div> <span>
Component { ... }
Shallow
"Integration"
TestBed.configureTestingModule({
imports: [ItemListModule]
});
TestBed.configureTestingModule({
declarations: [ItemListComponent],
errors: [NO_ERRORS_SCHEMA]
});
ItemList
ItemPreview
@yjaaidi
<div> <item-preview>
Component { ... }
<div> <span>
Component { ... }
Isolated
Shallow
"Integration"
TestBed.configureTestingModule({
imports: [ItemListModule]
});
TestBed.configureTestingModule({
declarations: [ItemListComponent],
errors: [NO_ERRORS_SCHEMA]
});
cmp = new ItemListComponent(...);
ItemList
ItemPreview
@yjaaidi
@yjaaidi
@yjaaidi
<sandwich-list>
<cart-preview>
Cart
@yjaaidi
<sandwich-list>
<cart-preview>
Cart
totalPrice
addSandwich(sandwich)
@yjaaidi
@yjaaidi
@yjaaidi
@yjaaidi
⚡️ Fast
@yjaaidi
👌 Less configuration
⚡️ Fast
@yjaaidi
👌 Less configuration
✌️ Test parallelization & isolation
⚡️ Fast
@yjaaidi
👌 Less configuration
🚀 No browser
✌️ Test parallelization & isolation
⚡️ Fast
@yjaaidi
👌 Less configuration
🚀 No browser
✌️ Test parallelization & isolation
⚡️ Fast
✅ Readable reports
@yjaaidi
👌 Less configuration
🚀 No browser
✌️ Test parallelization & isolation
⚡️ Fast
✅ Readable reports
🏘 Big community
@yjaaidi
Compatible with Jasmine syntax
👌 Less configuration
🚀 No browser
✌️ Test parallelization & isolation
⚡️ Fast
✅ Readable reports
🏘 Big community
@yjaaidi
@yjaaidi
npm install -g @briebug/jest-schematic
ng g @briebug/jest-schematic:add
yarn test --watch # or npm test -- --watch
@yjaaidi
✅ E2E testing
🐒 HttpTestingModule & RouterTestingModule
🦋 Visual testing
@yjaaidi
🏀 RxJS Marble Testing
@yjaaidi
📚 guide-angular.wishtack.io
📺 marmicode.fr
ℹ️ wishtack.io
Trainer, Tech Advisor & eXtreme Programming Coach
at {{yourCompany.name}}
FREE DIAGNOSTIC
FREE
DIAGNOSTIC
FREE
DIAGNOSTIC