---
title: "The new on property improves output testing in Angular Testing Library"
url: https://daily.dev/posts/the-new-on-property-improves-output-testing-in-angular-testing-library-ushprakpp
source_url: https://timdeschryver.dev/blog/the-new-on-property-improves-output-testing-in-angular-testing-library
type: article
source: "Tim Deschryver"
author: "Tim Deschryver"
published: 2026-05-31T07:47:20.072Z
updated: 2026-08-24T08:00:26.048Z
tags: ["testing", "typescript", "angular"]
reading_time: 3
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The new on property improves output testing in Angular Testing Library

**[Tim Deschryver](https://daily.dev/sources/timdeschryver)** · [@timdeschryver](https://daily.dev/timdeschryver) · 3 min read · 0 upvotes · 0 comments

## Summary

Angular Testing Library v17.1.0 introduces a new `on` API for testing component output properties. Previously, developers had to use `componentOutputs` or `componentProperties`, which lacked type safety and required manual creation of fake event emitters with type assertions. The new `on` property is set in the `render` function, accepts a spy or callback, and automatically unsubscribes when the component is destroyed or rerendered. As a result, `componentOutputs` and `componentProperties` are now deprecated and will be removed in the next major version.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://timdeschryver.dev/blog/the-new-on-property-improves-output-testing-in-angular-testing-library>

---

Tags: [#testing](https://daily.dev/tags/testing), [#typescript](https://daily.dev/tags/typescript), [#angular](https://daily.dev/tags/angular)

[View this post on daily.dev](https://daily.dev/posts/the-new-on-property-improves-output-testing-in-angular-testing-library-ushprakpp)
