From 65b87023c9a5d6975d76f322384aef3c1666b068 Mon Sep 17 00:00:00 2001 From: zhangxingxia Date: Tue, 9 Aug 2022 14:23:51 +0800 Subject: [PATCH] add statistics xts Signed-off-by: zhangxingxia --- .../entry/src/main/ets/test/StorageStatistics.test.ets | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage/storagestatisticsjstest/entry/src/main/ets/test/StorageStatistics.test.ets b/storage/storagestatisticsjstest/entry/src/main/ets/test/StorageStatistics.test.ets index 73a1fff56..1135b7de3 100644 --- a/storage/storagestatisticsjstest/entry/src/main/ets/test/StorageStatistics.test.ets +++ b/storage/storagestatisticsjstest/entry/src/main/ets/test/StorageStatistics.test.ets @@ -124,11 +124,15 @@ export default function storageStatisticsTest() { }; let tasks = [delay(), delay(), delay(), delay()]; Promise.all(tasks).then(results => { - let flag = !results.some(function(value){ + let isNotNull = results.every(bundleStat => { + return bundleStat != null; + }); + let flag = !results.some(value => { return JSON.stringify(value) !== JSON.stringify(results[0]); }) expect(results.length == tasks.length).assertTrue(); expect(flag).assertTrue(); + expect(isNotNull).assertTrue(); done(); }); } catch (error) { -- GitLab