angular / angular/angular-cli

Schematics testing infrastructure: compare Trees, copy Trees

Open
#12,707 2 comments 0 reactions 0 assignees View on GitHub
area: @angular-devkit/schematics feature feature: insufficient votes
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

### Bug Report or Feature Request (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [x] feature request
```

### Desired functionality

When unit testing a schematic or a rule, I have sometimes found that it would be convenient if I could take two trees and compare them. Or at least ask whether the two trees are equivalent.

As part of this, it would also be convenient if there was some Tree-copying function - specifically for checking that a Tree has _not_ changed after some Rule call, but possibly for other cases as well.

Contributor guide

Open the contributing guide

Research direction

Start by examining the schematics testing infrastructure and the Tree and Rule APIs referenced in the issue. Determine how tree equivalence and copying should behave, then add coverage showing that equivalent trees compare successfully and that a copied tree can be checked for changes after a rule call.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.