Skip to content

Commit

Permalink
chore(extension): fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Feb 20, 2025
1 parent 61e65da commit a7e1ceb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions doc/coc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ Neovim >= 0.8.0 or Vim >= 9.0.0483.

NodeJS https://nodejs.org/ >= 16.18.0.

For neovim user, use command |:checkhealth| to check issue with current
environment.

==============================================================================
INSTALLATION *coc-installation*

Expand Down
12 changes: 6 additions & 6 deletions src/__tests__/modules/extensions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('extensions', () => {
expect(extensions.onDidActiveExtension).toBeDefined()
expect(extensions.onDidUnloadExtension).toBeDefined()
expect(extensions.schemes).toBeDefined()
expect(extensions.creteInstaller('npm', 'id')).toBeDefined()
expect(extensions.createInstaller('npm', 'id')).toBeDefined()
})

it('should not throw with addSchemeProperty', async () => {
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('extensions', () => {
})

it('should catch error when installExtensions', async () => {
let spy = jest.spyOn(extensions, 'creteInstaller').mockImplementation(() => {
let spy = jest.spyOn(extensions, 'createInstaller').mockImplementation(() => {
return {
on: (_key, cb) => {
cb('msg', false)
Expand All @@ -184,7 +184,7 @@ describe('extensions', () => {
let spy = jest.spyOn(extensions, 'globalExtensionStats').mockImplementation(() => {
return [{ id: 'test' }] as any
})
let s = jest.spyOn(extensions, 'creteInstaller').mockImplementation(() => {
let s = jest.spyOn(extensions, 'createInstaller').mockImplementation(() => {
return {
on: () => {},
update: () => {
Expand All @@ -201,7 +201,7 @@ describe('extensions', () => {
let spy = jest.spyOn(extensions, 'globalExtensionStats').mockImplementation(() => {
return [{ id: 'test' }, { id: 'global', isLocked: true }, { id: 'disabled', state: 'disabled' }] as any
})
let s = jest.spyOn(extensions, 'creteInstaller').mockImplementation(() => {
let s = jest.spyOn(extensions, 'createInstaller').mockImplementation(() => {
return {
on: (_key, cb) => {
cb('msg', false)
Expand All @@ -222,7 +222,7 @@ describe('extensions', () => {
return [{ id: 'test', exotic: true, uri: 'http://example.com' }] as any
})
let called = false
let s = jest.spyOn(extensions, 'creteInstaller').mockImplementation(() => {
let s = jest.spyOn(extensions, 'createInstaller').mockImplementation(() => {
return {
on: (_key, cb) => {
cb('msg', false)
Expand Down Expand Up @@ -262,7 +262,7 @@ describe('extensions', () => {
it('should install global extension', async () => {
expect(extensions.getExtensionById('coc-omni')).toBeUndefined()
let folder = path.join(extensions.modulesFolder, 'coc-omni')
let spy = jest.spyOn(extensions, 'creteInstaller').mockImplementation(() => {
let spy = jest.spyOn(extensions, 'createInstaller').mockImplementation(() => {
return {
on: () => {},
install: async () => {
Expand Down
6 changes: 3 additions & 3 deletions src/extension/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class Extensions {
return silent ? new InstallChannel(isUpdate, this.outputChannel) : new InstallBuffer(isUpdate)
}

public creteInstaller(npm: string, def: string): IInstaller {
public createInstaller(npm: string, def: string): IInstaller {
return new Installer(this.modulesFolder, npm, def)
}

Expand All @@ -188,7 +188,7 @@ export class Extensions {
let fn = async (key: string): Promise<void> => {
try {
installBuffer.startProgress(key)
let installer = this.creteInstaller(npm, key)
let installer = this.createInstaller(npm, key)
installer.on('message', (msg, isProgress) => {
installBuffer.addMessage(key, msg, isProgress)
})
Expand Down Expand Up @@ -231,7 +231,7 @@ export class Extensions {
try {
installBuffer.startProgress(id)
let url = stat.exotic ? stat.uri : null
let installer = this.creteInstaller(npm, id)
let installer = this.createInstaller(npm, id)
installer.on('message', (msg, isProgress) => {
installBuffer.addMessage(id, msg, isProgress)
})
Expand Down

0 comments on commit a7e1ceb

Please sign in to comment.