Skip to content

Commit

Permalink
fix(test): setup does not await file copying (#68)
Browse files Browse the repository at this point in the history
- use `for` loop instead of `forEach` to await copying of each file
  • Loading branch information
marvin-kolja authored Jan 12, 2024
1 parent ec67642 commit ac25b19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/functional_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ac25b19

Please sign in to comment.