Device fakes
Stand in for the phone in a unit test: go offline, tap an NFC tag, pick a photo, press back. Import each function from @blotch/angular-lynx-testing-library.
How they work
- The setup fakes the native modules. A native module is the iOS or Android code behind a service such as
LynxNfc.ng testloads the library's setup, which puts a fake in its place. - Await
waitForUpdate()after a fake answers, before you check the screen. Many answers reach the app through the background thread, as on a phone. - Each test starts fresh. Each function says what a test starts with, such as a person who hasn't been asked for a permission yet.
