diff --git a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/ets/test/mediafetchoptionsPromise.test.ets b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/ets/test/mediafetchoptionsPromise.test.ets index f684ebe8185dd5fe8096a72ca3463b79c992ae47..87d79865a789fbfe501381fbbf85e932a93c38b6 100644 --- a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/ets/test/mediafetchoptionsPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/entry/src/main/ets/test/mediafetchoptionsPromise.test.ets @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Huawei Device Co., Ltd. + * Copyright (C) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -187,11 +187,12 @@ export default function mediafetchoptionsPromise(abilityContext) { }; try { const fetchFileResult = await media.getFileAssets(currentFetchOps); - expect(false).assertTrue(); + let count = await fetchFileResult.getCount(); + expect(count == 0).assertTrue(); fetchFileResult.close(); done(); } catch (err) { - expect(true).assertTrue(); + expect(false).assertTrue(); done(); } } catch (error) {