Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Angular
  • Table Of Contents Toc
Learning Angular

Learning Angular - Fifth Edition

By : Aristeidis Bampakos
4.6 (5)
close
close
Learning Angular

Learning Angular

4.6 (5)
By: Aristeidis Bampakos

Overview of this book

Dive into Angular Development — With the Most Trusted Guide in the Industry Angular is one of the most powerful and widely adopted JavaScript frameworks, and Learning Angular is your go-to guide for building real-world, production-ready web applications. Written by a seasoned Angular developer and Google Developer Expert, this hands-on book takes you through every step of modern frontend development. This edition reflects the latest “Angular Renaissance,” covering standalone components, Angular Signals, and the new control flow syntax, while showing you how to integrate with legacy code. A new chapter also explores boosting performance with server-side rendering (SSR) and hydration. More than just a tutorial, Learning Angular builds your confidence chapter by chapter from scaffolding your first project to deploying it, with TypeScript best practices throughout. Whether you’re new to Angular or sharpening your skills, this book provides a complete path to becoming a productive, future-ready Angular developer. By the end, you’ll be able to build Angular apps from scratch, with clarity, structure, and confidence.
Table of Contents (19 chapters)
close
close
17
Other Books You May Enjoy
18
Index

The anatomy of a unit test

There are many different ways to test a piece of code. In this chapter, we will look at the anatomy of a unit test—the separate parts it’s made of.

To test any code, we need a framework for writing the test and a runner to run it on. In this section, we will focus on the test framework. The test framework should provide utility functions for building test suites containing one or several test specs. As a result, unit testing involves the following concepts:

  • Test suite: A suite that creates a logical grouping for many tests. A suite, for example, can contain all the tests for a specific feature.
  • Test spec: The actual unit test.

We will use Jasmine in this chapter, a popular test framework that is also used by default in Angular CLI projects. This is what a unit test looks like in Jasmine:

describe('Calculator', () => {
  it('should add two numbers', () => {
    expect(1+1).toBe(2)...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Angular
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon