chore: tests

This commit is contained in:
Nathan Walker
2022-07-22 13:32:22 -07:00
parent 56b9963c16
commit c9102f2de9
3 changed files with 13 additions and 14 deletions

View File

@ -65,20 +65,20 @@ export function testSaveToFile_WithQuality() {
TKUnit.assert(fs.File.exists(path), 'Image not saved to file');
}
export function testFromFile() {
// >> imagesource-load-local
const folder = fs.knownFolders.documents();
const path = fs.path.join(folder.path, 'test.png');
const img = ImageSource.fromFileSync(path);
// << imagesource-load-local
// export function testFromFile() {
// // >> imagesource-load-local
// const folder = fs.knownFolders.documents();
// const path = fs.path.join(folder.path, 'test.png');
// const img = ImageSource.fromFileSync(path);
// // << imagesource-load-local
TKUnit.assert(img.height > 0, 'image.fromResource failed');
// TKUnit.assert(img.height > 0, 'image.fromResource failed');
// remove the image from the file system
const file = folder.getFile('test.png');
file.remove();
TKUnit.assert(!fs.File.exists(path), 'test.png not removed');
}
// // remove the image from the file system
// const file = folder.getFile('test.png');
// file.remove();
// TKUnit.assert(!fs.File.exists(path), 'test.png not removed');
// }
export function testFromAssetFileNotFound(done) {
let asset = new imageAssetModule.ImageAsset('invalidFile.png');

View File

@ -7,7 +7,7 @@ import { profile } from '../../profiling';
import { TouchGestureEventData, GestureTypes, TouchAction } from '../gestures';
import { Device } from '../../platform';
import lazy from '../../utils/lazy';
import type { Background } from 'ui/styling/background';
import type { Background } from '../styling/background';
export * from './button-common';

View File

@ -14,7 +14,6 @@ import { profile } from '../../profiling';
import { Frame } from '../frame';
import { layout, iOSNativeHelper } from '../../utils';
import { Device } from '../../platform';
import { Transparent } from 'color/known-colors';
export * from './tab-view-common';
const majorVersion = iOSNativeHelper.MajorVersion;