Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Your Own JavaScript Framework

You're reading from   Building Your Own JavaScript Framework Architect extensible and reusable framework systems

Arrow left icon
Product type Paperback
Published in Nov 2023
Publisher Packt
ISBN-13 9781804617403
Length 236 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Vlad Filippov Vlad Filippov
Author Profile Icon Vlad Filippov
Vlad Filippov
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Part 1: The Landscape of JavaScript Frameworks
2. Chapter 1: The Benefits of Different JavaScript Frameworks FREE CHAPTER 3. Chapter 2: Framework Organization 4. Chapter 3: Internal Framework Architecture 5. Chapter 4: Ensuring Framework Usability and Quality 6. Part 2: Framework Development
7. Chapter 5: Framework Considerations 8. Chapter 6: Building a Framework by Example 9. Chapter 7: Creating a Full Stack Framework 10. Chapter 8: Architecting Frontend Frameworks 11. Part 3: Maintaining Your Project
12. Chapter 9: Framework Maintenance 13. Chapter 10: Best Practices 14. Index 15. Other Books You May Enjoy

Architecting the new framework

Now, we’ll get to the architectural part of our practical approach. So far, we know what we are building and who we are building it for. It is now time to determine the shape of our feature set and see how we can enable those features for our users. The most basic use case that we would like to cover is generating assertions for JavaScript code, as presented here:

// basic.js
export function helloReader() {
  return "Hello reader!";
}
// tests/basic.js
import ct, { assert } from "componium-test";
import { helloReader } from "../basic.js";
ct({
  basic: function () {
    assert.strictEqual(helloReader(), "Hello reader!",
      "output is correct");
  },
});

The preceding code example tests the helloReader() function and verifies that the correct string is returned. Starting from these basics, to take things further...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime