Change:
const activeFileFsPath = path.resolve(fixtureRoot, 'about/about.html'); const suggestions = providePathSuggestions(value, mockRange, activeFileFsPath, fixtureRoot); <del> assert.equal(suggestions.length, 2); assert.equal(suggestions[0].label, 'feature.js'); assert.equal(suggestions[1].label, 'test.js'); </del> <ins> assertSuggestions(suggestions, [ { label: 'feature.js', kind: CompletionItemKind.File }, { label: 'test.js', kind: CompletionItemKind.File } ]); }); }); suite('Path Completion - Folder Commands:', () => { const mockRange = toRange(0, 3, 5); test('Folder should have command `editor.action.triggerSuggest', () => { const value = './'; const activeFileFsPath = path.resolve(fixtureRoot, 'index.html'); const suggestions = providePathSuggestions(value, mockRange, activeFileFsPath); </ins> <del> assert.equal(suggestions[0].kind, CompletionItemKind.File); assert.equal(suggestions[1].kind, CompletionItemKind.File); </del> <ins> assertSuggestions(suggestions, [ { label: 'about/', command: { title: 'Suggest', command: 'editor.action.triggerSuggest'} }, { label: 'index.html' }, { label: 'src/', command: { title: 'Suggest', command: 'editor.action.triggerSuggest'} }, ]); </ins> }); }); <del> suite('Path Completion - Incomplete Path at End', () => { const mockRange = Range.create(Position.create(0, 3), Position.create(0, 5)); </del> <ins> suite('Path Completion - Incomplete Path at End:', () => { const mockRange = toRange(0, 3, 5); </ins> test('Incomplete Path that starts with slash', () => { const value = '/src/f'; const activeFileFsPath = path.resolve(fixtureRoot, 'about/about.html'); const suggestions = providePathSuggestions(value, mockRange, activeFileFsPath, fixtureRoot); <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> test('Incomplete Path that does not start with slash', () => { const value = '../src/f'; const activeFileFsPath = path.resolve(fixtureRoot, 'about/about.html'); const suggestions = providePathSuggestions(value, mockRange, activeFileFsPath, fixtureRoot); <del> assert.equal(suggestions.length, 2); assert.equal(suggestions[0].label, 'feature.js'); assert.equal(suggestions[1].label, 'test.js'); </del> <ins> assertSuggestions(suggestions, [ { label: 'feature.js', kind: CompletionItemKind.File }, { label: 'test.js', kind: CompletionItemKind.File } ]); }); }); suite('Path Completion - No leading dot or slash:', () => { test('Top level completion', () => { const value = 's'; const activeFileFsPath = path.resolve(fixtureRoot, 'index.html'); const range = toRange(0, 3, 5); const suggestions = providePathSuggestions(value, range, activeFileFsPath, fixtureRoot); assertSuggestions(suggestions, [ { label: 'about/', kind: CompletionItemKind.Folder, textEdit: toTextEdit(0, 4, 4, 'about/') }, { label: 'index.html', kind: CompletionItemKind.File, textEdit: toTextEdit(0, 4, 4, 'index.html') }, { label: 'src/', kind: CompletionItemKind.Folder, textEdit: toTextEdit(0, 4, 4, 'src/') } ]); }); test('src/', () => { const value = 'src/'; const activeFileFsPath = path.resolve(fixtureRoot, 'index.html'); const range = toRange(0, 3, 8); const suggestions = providePathSuggestions(value, range, activeFileFsPath, fixtureRoot); </ins> <del> assert.equal(suggestions[0].kind, CompletionItemKind.File); assert.equal(suggestions[1].kind, CompletionItemKind.File); }); </del> <ins> assertSuggestions(suggestions, [ { label: 'feature.js', kind: CompletionItemKind.File, textEdit: toTextEdit(0, 7, 7, 'feature.js') }, { label: 'test.js', kind: CompletionItemKind.File, textEdit: toTextEdit(0, 7, 7, 'test.js') } ]); }); test('src/f', () => { const value = 'src/f'; const activeFileFsPath = path.resolve(fixtureRoot, 'index.html'); const range = toRange(0, 3, 9); const suggestions = providePathSuggestions(value, range, activeFileFsPath, fixtureRoot); assertSuggestions(suggestions, [ { label: 'feature.js', kind: CompletionItemKind.File, textEdit: toTextEdit(0, 7, 8, 'feature.js') }, { label: 'test.js', kind: CompletionItemKind.File, textEdit: toTextEdit(0, 7, 8, 'test.js') } ]); }); </ins> }); <del> suite('Path Completion - TextEdit', () => { </del> <ins> suite('Path Completion - TextEdit:', () => { </ins> test('TextEdit has correct replace text and range', () => { const value = './'; const activeFileFsPath = path.resolve(fixtureRoot, 'index.html'); <del> const range = Range.create(Position.create(0, 3), Position.create(0, 5)); const suggestions = providePathSuggestions(value, range, activeFileFsPath); assert.equal(suggestions[0].textEdit.newText, 'about'); assert.equal(suggestions[1].textEdit.newText, 'index.html'); assert.equal(suggestions[2].textEdit.newText, 'src'); assert.equal(suggestions[0].textEdit.range.start.character, 4); assert.equal(suggestions[1].textEdit.range.start.character, 4); assert.equal(suggestions[2].textEdit.range.start.character, 4); assert.equal(suggestions[0].textEdit.range.end.character, 4); assert.equal(suggestions[1].textEdit.range.end.character, 4); assert.equal(suggestions[2].textEdit.range.end.character, 4); </del> <ins> const range = toRange(0, 3, 5); const expectedReplaceRange = toRange(0, 4, 4); const suggestions = providePathSuggestions(value, range, activeFileFsPath); assertSuggestions(suggestions, [ { textEdit: TextEdit.replace(expectedReplaceRange, 'about/') }, { textEdit: TextEdit.replace(expectedReplaceRange, 'index.html') }, { textEdit: TextEdit.replace(expectedReplaceRange, 'src/') }, ]); </ins> }); });

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