This course was created with the
course builder. Create your online course today.
Start now
Create your course
with
Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Uncluttered: free yourself from Node with import maps and test-driven web development
Part One: Setup
The downloads
What you need to know
WTF is test-driven development?
You’re going to need a web server
Loosely coupled systems
Setting up the project
Don’t just curl|sh random scripts
Don’t over-engineer basic setup
The browsers are our runtime
The browser are our primary web development tool
EXAMPLE: browser launch scripts
EXAMPLE: the mocha HTML file
Continuous Integration (CI)
Part two: ES modules and import maps
On code smell and gut feeling
JavaScript modules are great, but also a little bit broken
The troubled history of standard JavaScript modules
We can do better
Managing dependencies in code is bad
Import maps bring loose coupling to ES modules and it’s genuine magic
We can use import maps right now, today
A new primitive for decoupling JavaScript modules
Part three: testing
Planning
Where to begin?
EXAMPLE: the actual test
And we’re d—oh, wait, there’s more?
Classicist testing
Mockist testing
Which school to choose?
EXAMPLE: mocking sources of randomness and time
Part four: dependencies
We have to talk about dependencies
Consider avoiding external dependencies altogether
Implicit dependency testing
EXAMPLE: the Mockist approach
Update and test one module at a time
Split your dependencies into layers
Part five: into production
Deployment strategies for import maps
If your platform has a strategy, use that
Progressive Enhancement
Polyfill and commit
Bundle using esbuild and a plugin
Which should you choose?
Don’t over-engineer basic setup
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock