MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / runImageTestSync

Function runImageTestSync

apps/automated/src/ui/image/image-tests.ts:57–69  ·  view source on GitHub ↗
(image: ImageModule.Image, src: string)

Source from the content-addressed store, hash-verified

55const IMAGE_LOADED_EVENT = 'isLoadingChange';
56
57function runImageTestSync(image: ImageModule.Image, src: string) {
58 image.loadMode = 'sync';
59 image.src = null;
60
61 const page = helper.getCurrentPage();
62 page.content = image;
63
64 image.src = src;
65
66 let imageSourceAvailable = __APPLE__ ? !!image.imageSource : true;
67 TKUnit.assertFalse(image.isLoading, 'Image.isLoading should be false.');
68 TKUnit.assertTrue(imageSourceAvailable, 'imageSource should be set.');
69}
70
71function runImageTestAsync(image: ImageModule.Image, src: string, done: (e: any) => void) {
72 image.loadMode = 'async';

Calls

no outgoing calls

Tested by

no test coverage detected