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

View File

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

View File

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