From e62a349c290680243a7a1870aef39e0bfbe32094 Mon Sep 17 00:00:00 2001 From: Marvin Willms Date: Fri, 12 Jan 2024 14:01:37 +0100 Subject: [PATCH] fix(test): setup does not await file copying - use `for` loop instead of `forEach` to await copying of each file --- test/functional_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional_test.dart b/test/functional_test.dart index 5259b84..9a374e9 100644 --- a/test/functional_test.dart +++ b/test/functional_test.dart @@ -20,11 +20,11 @@ void main() { out.buffer.clear(); err.buffer.clear(); temp = await Directory.systemTemp.createTemp(); - await Directory('test/template').list().forEach((element) async { + await for (final element in Directory('test/template').list()) { if (element is File) { await element.copy(path.join(temp.path, path.basename(element.path))); } - }); + } }); tearDown(() async {