From ca2ae285869aed65c835971dc05b02dd21207907 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 20 Dec 2022 08:12:52 +0100 Subject: [PATCH] tests --- .../node/parcelWatcher.integrationTest.ts | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/vs/platform/files/test/node/parcelWatcher.integrationTest.ts b/src/vs/platform/files/test/node/parcelWatcher.integrationTest.ts index ae4df7b5489e8..e84461915edc0 100644 --- a/src/vs/platform/files/test/node/parcelWatcher.integrationTest.ts +++ b/src/vs/platform/files/test/node/parcelWatcher.integrationTest.ts @@ -245,26 +245,20 @@ import { ltrim } from 'vs/base/common/strings'; await Promises.writeFile(anotherNewFilePath, 'Hello Another World'); await changeFuture; - // Skip following asserts on macOS where the fs-events service - // does not really give a full guarantee about the correlation - // of an event to a change. - if (!isMacintosh) { - - // Read file does not emit event - changeFuture = awaitEvent(watcher, anotherNewFilePath, FileChangeType.UPDATED, 'unexpected-event-from-read-file'); - await Promises.readFile(anotherNewFilePath); - await Promise.race([timeout(100), changeFuture]); - - // Stat file does not emit event - changeFuture = awaitEvent(watcher, anotherNewFilePath, FileChangeType.UPDATED, 'unexpected-event-from-stat'); - await Promises.stat(anotherNewFilePath); - await Promise.race([timeout(100), changeFuture]); - - // Stat folder does not emit event - changeFuture = awaitEvent(watcher, copiedFolderpath, FileChangeType.UPDATED, 'unexpected-event-from-stat'); - await Promises.stat(copiedFolderpath); - await Promise.race([timeout(100), changeFuture]); - } + // Read file does not emit event + changeFuture = awaitEvent(watcher, anotherNewFilePath, FileChangeType.UPDATED, 'unexpected-event-from-read-file'); + await Promises.readFile(anotherNewFilePath); + await Promise.race([timeout(100), changeFuture]); + + // Stat file does not emit event + changeFuture = awaitEvent(watcher, anotherNewFilePath, FileChangeType.UPDATED, 'unexpected-event-from-stat'); + await Promises.stat(anotherNewFilePath); + await Promise.race([timeout(100), changeFuture]); + + // Stat folder does not emit event + changeFuture = awaitEvent(watcher, copiedFolderpath, FileChangeType.UPDATED, 'unexpected-event-from-stat'); + await Promises.stat(copiedFolderpath); + await Promise.race([timeout(100), changeFuture]); // Delete file changeFuture = awaitEvent(watcher, copiedFilepath, FileChangeType.DELETED);