mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Fix nsfw tests on windows
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
'use strict';
|
||||
|
||||
import assert = require('assert');
|
||||
import platform = require('vs/base/common/platform');
|
||||
|
||||
import { NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService';
|
||||
import { IWatcherRequest } from 'vs/workbench/services/files/node/watcher/nsfw/watcher';
|
||||
|
||||
@@ -22,6 +24,10 @@ class TestNsfwWatcherService extends NsfwWatcherService {
|
||||
suite('NSFW Watcher Service', () => {
|
||||
suite('_normalizeRoots', () => {
|
||||
test('should not impacts roots that don\'t overlap', () => {
|
||||
if (platform.isWindows) {
|
||||
return;
|
||||
}
|
||||
|
||||
const service = new TestNsfwWatcherService();
|
||||
assert.deepEqual(service.normalizeRoots(['/a']), ['/a']);
|
||||
assert.deepEqual(service.normalizeRoots(['/a', '/b']), ['/a', '/b']);
|
||||
@@ -29,6 +35,10 @@ suite('NSFW Watcher Service', () => {
|
||||
});
|
||||
|
||||
test('should remove sub-folders of other roots', () => {
|
||||
if (platform.isWindows) {
|
||||
return;
|
||||
}
|
||||
|
||||
const service = new TestNsfwWatcherService();
|
||||
assert.deepEqual(service.normalizeRoots(['/a', '/a/b']), ['/a']);
|
||||
assert.deepEqual(service.normalizeRoots(['/a', '/b', '/a/b']), ['/a', '/b']);
|
||||
|
||||
Reference in New Issue
Block a user