Change:
import * as assert from 'assert'; import * as path from 'path'; import { providePathSuggestions } from '../../modes/pathCompletion'; <del> import { CompletionItemKind, Range, Position } from 'vscode-languageserver-types'; </del> <ins> import { CompletionItemKind, Range, Position, CompletionItem, TextEdit, Command } from 'vscode-languageserver-types'; </ins> const fixtureRoot = path.resolve(__dirname, '../../../test/pathCompletionFixtures'); <del> suite('Path Completion - Relative Path', () => { const mockRange = Range.create(Position.create(0, 3), Position.create(0, 5)); </del> <ins> function toRange(line: number, startChar: number, endChar: number) { return Range.create(Position.create(line, startChar), Position.create(line, endChar)); } function toTextEdit(line: number, startChar: number, endChar: number, newText: string) { const range = Range.create(Position.create(line, startChar), Position.create(line, endChar)); return TextEdit.replace(range, newText); } interface PathSuggestion { label?: string; kind?: CompletionItemKind; textEdit?: TextEdit; command?: Command; } function assertSuggestions(actual: CompletionItem[], expected: PathSuggestion[]) { assert.equal(actual.length, expected.length, `Suggestions have length ${actual.length} but should have length ${expected.length}`); for (let i = 0; i < expected.length; i++) { if (expected[i].label) { assert.equal( actual[i].label, expected[i].label, `Suggestion ${actual[i].label} should have label ${expected[i].label}` ); } if (expected[i].kind) { assert.equal(actual[i].kind, expected[i].kind, `Suggestion ${actual[i].label} has type ${CompletionItemKind[actual[i].kind]} but should have label ${CompletionItemKind[expected[i].kind]}` ); } if (expected[i].textEdit) { assert.equal(actual[i].textEdit.newText, expected[i].textEdit.newText); assert.deepEqual(actual[i].textEdit.range, expected[i].textEdit.range); } if (expected[i].command) { assert.equal( actual[i].command.title, expected[i].command.title, `Suggestion ${actual[i].label} has command title ${actual[i].command.title} but should have command title ${expected[i].command.title}` ); assert.equal( actual[i].command.command, expected[i].command.command, `Suggestion ${actual[i].label} has command ${actual[i].command.command} but should have command ${expected[i].command.command}` ); } } } suite('Path Completion - Relative Path:', () => { const mockRange = toRange(0, 3, 5); </ins> test('Current Folder', () => { const value = './'; const activeFileFsPath = path.resolve(fixtureRoot, 'index.html'); const suggestions = providePathSuggestions(value, mockRange, activeFileFsPath); <del> assert.equal(suggestions.length, 3); assert.equal(suggestions[0].label, 'about'); assert.equal(suggestions[1].label, 'index.html'); assert.equal(suggestions[2].label, 'src'); assert.equal(suggestions[0].kind, CompletionItemKind.Folder); assert.equal(suggestions[1].kind, CompletionItemKind.File); assert.equal(suggestions[2].kind, CompletionItemKind.Folder); </del> <ins> assertSuggestions(suggestions, [ { label: 'about/', kind: CompletionItemKind.Folder }, { label: 'index.html', kind: CompletionItemKind.File }, { label: 'src/', kind: CompletionItemKind.Folder } ]); </ins> }); <del> test('Parent Folder', () => { </del> <ins> test('Parent Folder:', () => { </ins> const value = '../'; const activeFileFsPath = path.resolve(fixtureRoot, 'about/about.html'); const suggestions = providePathSuggestions(value, mockRange, activeFileFsPath); <del> assert.equal(suggestions.length, 3); assert.equal(suggestions[0].label, 'about'); assert.equal(suggestions[1].label, 'index.html'); assert.equal(suggestions[2].label, 'src'); assert.equal(suggestions[0].kind, CompletionItemKind.Folder); assert.equal(suggestions[1].kind, CompletionItemKind.File); assert.equal(suggestions[2].kind, CompletionItemKind.Folder); </del> <ins> assertSuggestions(suggestions, [ { label: 'about/', kind: CompletionItemKind.Folder }, { label: 'index.html', kind: CompletionItemKind.File }, { label: 'src/', kind: CompletionItemKind.Folder } ]); </ins> }); <del> test('Adjacent Folder', () => { </del> <ins> test('Adjacent Folder:', () => { </ins> const value = '../src/'; const activeFileFsPath = path.resolve(fixtureRoot, 'about/about.html'); const suggestions = providePathSuggestions(value, mockRange, activeFileFsPath); <del> assert.equal(suggestions.length, 2); assert.equal(suggestions[0].label, 'feature.js'); assert.equal(suggestions[1].label, 'test.js'); assert.equal(suggestions[0].kind, CompletionItemKind.File); assert.equal(suggestions[1].kind, CompletionItemKind.File); </del> <ins> assertSuggestions(suggestions, [ { label: 'feature.js', kind: CompletionItemKind.File }, { label: 'test.js', kind: CompletionItemKind.File } ]); </ins> }); }); <del> suite('Path Completion - Absolute Path', () => { const mockRange = Range.create(Position.create(0, 3), Position.create(0, 5)); </del> <ins> suite('Path Completion - Absolute Path:', () => { const mockRange = toRange(0, 3, 5); </ins> test('Root', () => { const value = '/'; const activeFileFsPath1 = path.resolve(fixtureRoot, 'index.html'); const activeFileFsPath2 = path.resolve(fixtureRoot, 'about/index.html'); <del> const suggestions1 = providePathSuggestions(value, mockRange, activeFileFsPath1, fixtureRoot); const suggestions2 = providePathSuggestions(value, mockRange, activeFileFsPath2, fixtureRoot); </del> <ins> const suggestions1 = providePathSuggestions(value, mockRange, activeFileFsPath1, fixtureRoot); const suggestions2 = providePathSuggestions(value, mockRange, activeFileFsPath2, fixtureRoot); </ins> const verify = (suggestions) => { <del> assert.equal(suggestions[0].label, 'about'); assert.equal(suggestions[1].label, 'index.html'); assert.equal(suggestions[2].label, 'src'); assert.equal(suggestions[0].kind, CompletionItemKind.Folder); assert.equal(suggestions[1].kind, CompletionItemKind.File); assert.equal(suggestions[2].kind, CompletionItemKind.Folder); </del> <ins> assertSuggestions(suggestions, [ { label: 'about/', kind: CompletionItemKind.Folder }, { label: 'index.html', kind: CompletionItemKind.File }, { label: 'src/', kind: CompletionItemKind.Folder } ]); </ins> }; verify(suggestions1);

Discussion:
Testing Version 1.21.0-insider Commit Date 2018-03-01T06:47:39.037Z create , in a folder in `' have and do code completion after . -should show as a proposal