Repository navigation
Highlights
- 🧪 New
ngx-skeleton-loader/testingentry point withNgxSkeletonLoaderHarness, an Angular CDK component harness to test<ngx-skeleton-loader>without querying its internal DOM - 🔎 Typed getters for what the skeleton renders:
getAppearance(),getAnimation(),getItemCount(),getLoadingText()andgetAriaLabel(), plusNgxSkeletonLoaderHarness.with({ appearance, animation, loadingText })filters - 📦
@angular/cdk(>=19.0.0) is an optional peer dependency: only projects that use the harness need it, and the main entry point does not import it
No breaking changes.
Usage
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { NgxSkeletonLoaderHarness } from 'ngx-skeleton-loader/testing';
const loader = TestbedHarnessEnvironment.loader(fixture);
const skeleton = await loader.getHarness(NgxSkeletonLoaderHarness);
expect(await skeleton.getAppearance()).toBe('circle');
expect(await skeleton.getItemCount()).toBe(1);More details in the blog post: ngx-skeleton-loader/testing — a component harness that keeps your tests (and your agents) in sync
Thanks to @chimurai for the RFC and the implementation in #313 and #314 🎉
Full Changelog: v14.0.0...v14.1.0