Skip to content

Commit

Permalink
fix(test): fix util test
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Sep 26, 2023
1 parent 249b9df commit 06d5dfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/completion/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CancellationToken, CompletionItem, CompletionItemKind, CompletionItemTa
import { caseScore, matchScore, matchScoreWithPositions } from '../../completion/match'
import sources from '../../completion/sources'
import { CompleteOption, InsertMode, ISource } from '../../completion/types'
import { checkIgnoreRegexps, Converter, ConvertOption, createKindMap, emptLabelDetails, getDetail, getDocumentaions, getInput, getKindHighlight, getKindText, getPriority, getReplaceRange, getResumeInput, getWord, hasAction, highlightOffert, indentChanged, isWordCode, MruLoader, OptionForWord, Selection, shouldIndent, shouldStop, toCompleteDoneItem } from '../../completion/util'
import { checkIgnoreRegexps, Converter, ConvertOption, createKindMap, emptLabelDetails, getDetail, getDocumentaions, getInput, getKindHighlight, getKindText, getPriority, getReplaceRange, getResumeInput, getWord, hasAction, highlightOffset, indentChanged, isWordCode, MruLoader, OptionForWord, Selection, shouldIndent, shouldStop, toCompleteDoneItem } from '../../completion/util'
import { WordDistance } from '../../completion/wordDistance'
import events from '../../events'
import languages from '../../languages'
Expand Down Expand Up @@ -87,10 +87,10 @@ describe('util functions', () => {
})

it('should get highlight offset', () => {
let n = highlightOffert(3, { abbr: 'abc', filterText: 'def' })
let n = highlightOffset(3, { abbr: 'abc', filterText: 'def' })
expect(n).toBe(-1)
expect(highlightOffert(3, { abbr: 'abc', filterText: 'abc' })).toBe(3)
expect(highlightOffert(3, { abbr: 'xy abc', filterText: 'abc' })).toBe(6)
expect(highlightOffset(3, { abbr: 'abc', filterText: 'abc' })).toBe(3)
expect(highlightOffset(3, { abbr: 'xy abc', filterText: 'abc' })).toBe(6)
})

it('should getKindText', () => {
Expand Down

0 comments on commit 06d5dfd

Please sign in to comment.