View profile

Mastering JS - Maintainable Tutorials by Testing Code Samples

One of the problems with tech content is that it falls out of date. Examples that worked 2 years ago
Mastering JS - Maintainable Tutorials by Testing Code Samples
One of the problems with tech content is that it falls out of date. Examples that worked 2 years ago may no longer work today, or be littered with deprecation warnings.
Acquit is a tool that converts Mocha tests to documentation. That’s what Mastering JS uses to make sure our examples actually work. For example, we have a new tutorial this week about uploading files to Amazon S3. Here’s what the example looks like:

Example in the tutorial
Example in the tutorial
Under the hood, this example gets pulled from a Mocha test suite using acquit-require. In our test suite, here’s what that example looks like.

Test asserting that the example works
Test asserting that the example works
This is how we’ll ensure our examples stay up to date, so they will continue to be valuable even as the JavaScript ecosystem evolves.
This Week's Tutorials
Did you enjoy this issue?
Mastering JavaScript Tutorials

Mastering JavaScript Tutorials

If you don't want these updates anymore, please unsubscribe here
If you were forwarded this newsletter and you like it, you can subscribe here
Powered by Revue