Skip to content

Commit 03f0537

Browse files
author
Dimitar Kerezov
committed
Fix message for tests
1 parent 75578ea commit 03f0537

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/services/livesync/platform-livesync-service-base.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as path from "path";
2+
import * as util from "util";
23
import { APP_FOLDER_NAME } from "../../constants";
34

45
export abstract class PlatformLiveSyncServiceBase {
@@ -95,6 +96,8 @@ export abstract class PlatformLiveSyncServiceBase {
9596
} else {
9697
await deviceAppData.device.fileSystem.transferFiles(deviceAppData, localToDevicePaths);
9798
}
99+
100+
this.logFilesSyncInformation(localToDevicePaths, "Successfully transferred %s.", this.$logger.info);
98101
}
99102

100103
protected async getAppData(syncInfo: IFullSyncInfo): Promise<Mobile.IDeviceAppData> {
@@ -108,4 +111,15 @@ export abstract class PlatformLiveSyncServiceBase {
108111
isLiveSyncSupported: async () => true
109112
};
110113
}
114+
115+
private logFilesSyncInformation(localToDevicePaths: Mobile.ILocalToDevicePathData[], message: string, action: Function): void {
116+
if (localToDevicePaths && localToDevicePaths.length < 10) {
117+
_.each(localToDevicePaths, (file: Mobile.ILocalToDevicePathData) => {
118+
action.call(this.$logger, util.format(message, path.basename(file.getLocalPath()).yellow));
119+
});
120+
} else {
121+
action.call(this.$logger, util.format(message, "all files"));
122+
}
123+
}
124+
111125
}

0 commit comments

Comments
 (0)