@blotch/angular-lynx-testing-library
Renders a component through the Lynx renderer in a unit test. Then you find and tap its elements with Testing Library queries that read Lynx's accessibility attributes. import { render } from '@blotch/angular-lynx-testing-library';
Usage
src/app/counter/counter.ts
src/app/counter/counter.test.ts
- Add the library with
ng generate @blotch/angular-lynx:add-testing. - Run the tests with
ng test. The unit-test builder loads the library's setup, so there's no setup file to write.
API
Setup entry
The package also has a @blotch/angular-lynx-testing-library/setup entry, which prepares the Lynx test environment. It fakes the phone's native modules, too: see Device fakes.
ng test loads it for you.
