Skip to content

Commit 3ba8a08

Browse files
committed
test: enable ts5 tests
1 parent 140b51d commit 3ba8a08

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

typescript/src/completionsAtPosition.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export const getCompletionsAtPosition = (
7272
const exactNode = findChildContainingExactPosition(sourceFile, position)
7373
const isCheckedFile =
7474
!tsFull.isSourceFileJS(sourceFile as any) || !!tsFull.isCheckJsEnabledForFile(sourceFile as any, additionalData.compilerOptions as any)
75-
// throw new Error('Test')
7675
Object.assign(sharedCompletionContext, {
7776
position,
7877
languageService,
@@ -102,7 +101,6 @@ export const getCompletionsAtPosition = (
102101
}
103102
}
104103
let prior = getPrior()
105-
console.log('prior', prior)
106104
const ensurePrior = () => {
107105
if (!prior) prior = { entries: [], isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false }
108106
return true

typescript/test/completions.spec.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { pickObj } from '@zardoy/utils'
22
import type {} from 'vitest/globals'
33
import _ from 'lodash'
44
import { isGoodPositionMethodCompletion } from '../src/completions/isGoodPositionMethodCompletion'
5-
import { findChildContainingExactPosition } from '../src/utils'
5+
import { findChildContainingExactPosition, isTs5 } from '../src/utils'
66
import handleCommand from '../src/specialCommands/handle'
77
import constructMethodSnippet from '../src/constructMethodSnippet'
88
import { defaultConfigFunc, entrypoint, settingsOverride, sharedLanguageService } from './shared'
@@ -462,8 +462,9 @@ test('Fix properties sorting', () => {
462462
settingsOverride.fixSuggestionsSorting = false
463463
})
464464

465-
// ts 5
466-
test.todo('Change to function kind', () => {
465+
const testTs5 = isTs5() ? test : test.todo
466+
467+
testTs5('Change to function kind', () => {
467468
settingsOverride['experiments.changeKindToFunction'] = true
468469
overrideSettings({
469470
'experiments.changeKindToFunction': true,
@@ -484,12 +485,12 @@ test.todo('Change to function kind', () => {
484485
settingsOverride['experiments.changeKindToFunction'] = false
485486
})
486487

487-
// ts 5
488-
test.todo('Filter JSX Components', () => {
488+
testTs5('Filter JSX Components', () => {
489489
const tester = fourslashLikeTester(/* ts */ `
490490
const a = () => {}
491491
a/*1*/
492492
`)
493+
// TODO
493494
})
494495

495496
test('Omit<..., ""> suggestions', () => {

0 commit comments

Comments
 (0)